Ignore:
Timestamp:
May 5, 2017, 1:38:42 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
805c167, c352893
Parents:
43426d4 (diff), 4f9636f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branches 'master' and 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    r43426d4 r982ed5b  
    262262                        } // if
    263263                } else {
    264                         output << typeDecl->typeString() << " " << typeDecl->get_name();
     264                        output << typeDecl->genTypeString() << " " << typeDecl->get_name();
     265                        if ( typeDecl->get_kind() != TypeDecl::Any && typeDecl->get_sized() ) {
     266                                output << " | sized(" << typeDecl->get_name() << ")";
     267                        }
    265268                        if ( ! typeDecl->get_assertions().empty() ) {
    266269                                output << " | { ";
     
    769772        void CodeGenerator::visit( ExprStmt * exprStmt ) {
    770773                assert( exprStmt );
    771                 // cast the top-level expression to void to reduce gcc warnings.
    772                 Expression * expr = new CastExpr( exprStmt->get_expr() );
     774                Expression * expr = exprStmt->get_expr();
     775                if ( genC ) {
     776                        // cast the top-level expression to void to reduce gcc warnings.
     777                        expr = new CastExpr( expr );
     778                }
    773779                expr->accept( *this );
    774780                output << ";";
Note: See TracChangeset for help on using the changeset viewer.