Changeset ea23d10 for src


Ignore:
Timestamp:
Feb 8, 2017, 2:35:08 PM (8 years ago)
Author:
Aaron Moss <a3moss@…>
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:
e994912, f923b5f
Parents:
424931d (diff), 4fbdd1e3 (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 branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
src
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    r424931d rea23d10  
    8989        }
    9090
    91         CodeGenerator::CodeGenerator( std::ostream & os, bool mangle ) : indent( *this), cur_indent( 0 ), insideFunction( false ), output( os ), printLabels( *this ), mangle( mangle ) {}
     91        CodeGenerator::CodeGenerator( std::ostream & os, bool pretty ) : indent( *this), cur_indent( 0 ), insideFunction( false ), output( os ), printLabels( *this ), pretty( pretty ) {}
    9292
    9393        CodeGenerator::CodeGenerator( std::ostream & os, std::string init, int indentation, bool infunp )
     
    102102
    103103        string CodeGenerator::mangleName( DeclarationWithType * decl ) {
    104                 if ( ! mangle ) return decl->get_name();
     104                if ( pretty ) return decl->get_name();
    105105                if ( decl->get_mangleName() != "" ) {
    106106                        // need to incorporate scope level in order to differentiate names for destructors
     
    140140                        output << "_Noreturn ";
    141141                } // if
    142                 output << genType( functionDecl->get_functionType(), mangleName( functionDecl ) );
     142                output << genType( functionDecl->get_functionType(), mangleName( functionDecl ), pretty );
    143143
    144144                // how to get this to the Functype?
     
    161161
    162162                handleStorageClass( objectDecl );
    163                 output << genType( objectDecl->get_type(), mangleName( objectDecl ) );
     163                output << genType( objectDecl->get_type(), mangleName( objectDecl ), pretty );
    164164
    165165                asmName( objectDecl );
     
    178178        void CodeGenerator::handleAggregate( AggregateDecl * aggDecl ) {
    179179                genAttributes( aggDecl->get_attributes() );
    180                
     180
    181181                if ( aggDecl->get_name() != "" )
    182182                        output << aggDecl->get_name();
     
    249249                assert( false && "Typedefs are removed and substituted in earlier passes." );
    250250                //output << "typedef ";
    251                 //output << genType( typeDecl->get_base(), typeDecl->get_name() );
     251                //output << genType( typeDecl->get_base(), typeDecl->get_name(), pretty );
    252252        }
    253253
     
    258258                output << "extern unsigned long " << typeDecl->get_name();
    259259                if ( typeDecl->get_base() ) {
    260                         output << " = sizeof( " << genType( typeDecl->get_base(), "" ) << " )";
     260                        output << " = sizeof( " << genType( typeDecl->get_base(), "", pretty ) << " )";
    261261                } // if
    262262        }
     
    552552                        // at least one result type of cast, but not an lvalue
    553553                        output << "(";
    554                         output << genType( castExpr->get_result(), "" );
     554                        output << genType( castExpr->get_result(), "", pretty );
    555555                        output << ")";
    556556                } else {
     
    592592                output << "sizeof(";
    593593                if ( sizeofExpr->get_isType() ) {
    594                         output << genType( sizeofExpr->get_type(), "" );
     594                        output << genType( sizeofExpr->get_type(), "", pretty );
    595595                } else {
    596596                        sizeofExpr->get_expr()->accept( *this );
     
    604604                output << "__alignof__(";
    605605                if ( alignofExpr->get_isType() ) {
    606                         output << genType( alignofExpr->get_type(), "" );
     606                        output << genType( alignofExpr->get_type(), "", pretty );
    607607                } else {
    608608                        alignofExpr->get_expr()->accept( *this );
     
    618618                // use GCC builtin
    619619                output << "__builtin_offsetof(";
    620                 output << genType( offsetofExpr->get_type(), "" );
     620                output << genType( offsetofExpr->get_type(), "", pretty );
    621621                output << ", " << mangleName( offsetofExpr->get_member() );
    622622                output << ")";
     
    680680        void CodeGenerator::visit( CompoundLiteralExpr *compLitExpr ) {
    681681                assert( compLitExpr->get_type() && dynamic_cast< ListInit * > ( compLitExpr->get_initializer() ) );
    682                 output << "(" << genType( compLitExpr->get_type(), "" ) << ")";
     682                output << "(" << genType( compLitExpr->get_type(), "", pretty ) << ")";
    683683                compLitExpr->get_initializer()->accept( *this );
    684684        }
  • src/CodeGen/CodeGenerator.h

    r424931d rea23d10  
    3030                static int tabsize;
    3131
    32                 CodeGenerator( std::ostream &os, bool mangle = true );
     32                CodeGenerator( std::ostream &os, bool pretty = false );
    3333                CodeGenerator( std::ostream &os, std::string, int indent = 0, bool infun = false );
    3434                CodeGenerator( std::ostream &os, char *, int indent = 0, bool infun = false );
     
    119119                std::ostream &output;
    120120                LabelPrinter printLabels;
    121                 bool mangle = true;
     121                bool pretty = false;  // pretty print
    122122
    123123                void printDesignators( std::list< Expression * > & );
  • src/CodeGen/GenType.cc

    r424931d rea23d10  
    2828        class GenType : public Visitor {
    2929          public:
    30                 GenType( const std::string &typeString, bool mangle = true );
     30                GenType( const std::string &typeString, bool pretty = false );
    3131                std::string get_typeString() const { return typeString; }
    3232                void set_typeString( const std::string &newValue ) { typeString = newValue; }
     
    5151
    5252                std::string typeString;
    53                 bool mangle = true;
     53                bool pretty = false; // pretty print
    5454        };
    5555
    56         std::string genType( Type *type, const std::string &baseString, bool mangle ) {
    57                 GenType gt( baseString, mangle );
    58                 std::ostringstream os;
    59                
     56        std::string genType( Type *type, const std::string &baseString, bool pretty ) {
     57                GenType gt( baseString, pretty );
     58                std::ostringstream os;
     59
    6060                if ( ! type->get_attributes().empty() ) {
    61                         CodeGenerator cg( os, mangle );
     61                        CodeGenerator cg( os, pretty );
    6262                        cg.genAttributes( type->get_attributes() );
    6363                } // if
     
    6767        }
    6868
    69         GenType::GenType( const std::string &typeString, bool mangle ) : typeString( typeString ), mangle( mangle ) {}
     69  std::string genPrettyType( Type * type, const std::string & baseString ) {
     70        return genType( type, baseString, true );
     71  }
     72
     73        GenType::GenType( const std::string &typeString, bool pretty ) : typeString( typeString ), pretty( pretty ) {}
    7074
    7175        void GenType::visit( VoidType *voidType ) {
     
    108112                } // if
    109113                if ( dimension != 0 ) {
    110                         CodeGenerator cg( os, mangle );
     114                        CodeGenerator cg( os, pretty );
    111115                        dimension->accept( cg );
    112116                } else if ( isVarLen ) {
     
    162166                        } // if
    163167                } else {
    164                         CodeGenerator cg( os, mangle );
     168                        CodeGenerator cg( os, pretty );
    165169                        os << "(" ;
    166170
     
    203207
    204208        void GenType::visit( TupleType * tupleType ) {
    205                 assertf( ! mangle, "Tuple types should not make it to Code Gen." );
     209                assertf( pretty, "Tuple types should not make it to Code Gen." );
    206210                Visitor::visit( tupleType );
     211                unsigned int i = 0;
     212                std::ostringstream os;
     213                os << "[";
     214                for ( Type * t : *tupleType ) {
     215                        i++;
     216                        os << genType( t, "", pretty ) << (i == tupleType->size() ? "" : ", ");
     217                }
     218                os << "]";
     219                typeString = os.str() + typeString;
    207220        }
    208221
     
    214227        void GenType::visit( ZeroType *zeroType ) {
    215228                // ideally these wouldn't hit codegen at all, but should be safe to make them ints
    216                 typeString = "long int " + typeString;
     229                typeString = (pretty ? "zero_t " : "long int ") + typeString;
    217230                handleQualifiers( zeroType );
    218231        }
     
    220233        void GenType::visit( OneType *oneType ) {
    221234                // ideally these wouldn't hit codegen at all, but should be safe to make them ints
    222                 typeString = "long int " + typeString;
     235                typeString = (pretty ? "one_t " : "long int ") + typeString;
    223236                handleQualifiers( oneType );
    224237        }
  • src/CodeGen/GenType.h

    r424931d rea23d10  
    2121
    2222namespace CodeGen {
    23         std::string genType( Type *type, const std::string &baseString, bool mangle = true );
     23        std::string genType( Type *type, const std::string &baseString, bool pretty = false );
     24  std::string genPrettyType( Type * type, const std::string & baseString );
    2425} // namespace CodeGen
    2526
  • src/CodeGen/Generate.cc

    r424931d rea23d10  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Generate.cc -- 
     7// Generate.cc --
    88//
    99// Author           : Richard C. Bilson
     
    2626
    2727namespace CodeGen {
    28         void generate( std::list< Declaration* > translationUnit, std::ostream &os, bool doIntrinsics ) {
    29                 CodeGen::CodeGenerator cgv( os );
     28        void generate( std::list< Declaration* > translationUnit, std::ostream &os, bool doIntrinsics, bool pretty ) {
     29                CodeGen::CodeGenerator cgv( os, pretty );
    3030
    3131                for ( std::list<Declaration *>::iterator i = translationUnit.begin(); i != translationUnit.end();  i++ ) {
  • src/CodeGen/Generate.h

    r424931d rea23d10  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Generate.h -- 
     7// Generate.h --
    88//
    99// Author           : Richard C. Bilson
     
    2424namespace CodeGen {
    2525        /// Generates code
    26         void generate( std::list< Declaration* > translationUnit, std::ostream &os, bool doIntrinsics );
     26        void generate( std::list< Declaration* > translationUnit, std::ostream &os, bool doIntrinsics, bool pretty );
    2727} // namespace CodeGen
    2828
  • src/GenPoly/Box.cc

    r424931d rea23d10  
    13071307                                }
    13081308                        }
     1309                        // errors should have been caught by this point, remove initializers from parameters to allow correct codegen of default arguments
     1310                        for ( Declaration * param : functionDecl->get_functionType()->get_parameters() ) {
     1311                                if ( ObjectDecl * obj = dynamic_cast< ObjectDecl * >( param ) ) {
     1312                                        delete obj->get_init();
     1313                                        obj->set_init( nullptr );
     1314                                }
     1315                        }
    13091316                        return functionDecl;
    13101317                }
  • src/InitTweak/FixInit.cc

    r424931d rea23d10  
    104104                        virtual void visit( CompoundStmt *compoundStmt ) override;
    105105                        virtual void visit( DeclStmt *stmt ) override;
     106
     107                        // don't go into other functions
     108                        virtual void visit( FunctionDecl *decl ) override {}
     109
    106110                  protected:
    107111                        ObjectSet curVars;
     
    166170                        typedef std::list< OrderedDecls > OrderedDeclsStack;
    167171
    168                         InsertDtors( LabelFinder & finder ) : labelVars( finder.vars ) {}
     172                        InsertDtors( LabelFinder & finder ) : finder( finder ), labelVars( finder.vars ) {}
    169173
    170174                        using Parent::visit;
    171175
    172176                        virtual void visit( ObjectDecl * objDecl ) override;
     177                        virtual void visit( FunctionDecl * funcDecl ) override;
    173178
    174179                        virtual void visit( CompoundStmt * compoundStmt ) override;
     
    178183                        void handleGoto( BranchStmt * stmt );
    179184
     185                        LabelFinder & finder;
    180186                        LabelFinder::LabelMap & labelVars;
    181187                        OrderedDeclsStack reverseDeclOrder;
     
    318324                        LabelFinder finder;
    319325                        InsertDtors inserter( finder );
    320                         acceptAll( translationUnit, finder );
    321326                        acceptAll( translationUnit, inserter );
    322327                }
     
    778783                }
    779784
    780                 void ObjDeclCollector::visit( CompoundStmt *compoundStmt ) {
     785                void ObjDeclCollector::visit( CompoundStmt * compoundStmt ) {
    781786                        std::set< ObjectDecl * > prevVars = curVars;
    782787                        Parent::visit( compoundStmt );
     
    784789                }
    785790
    786                 void ObjDeclCollector::visit( DeclStmt *stmt ) {
     791                void ObjDeclCollector::visit( DeclStmt * stmt ) {
    787792                        // keep track of all variables currently in scope
    788793                        if ( ObjectDecl * objDecl = dynamic_cast< ObjectDecl * > ( stmt->get_decl() ) ) {
     
    828833                        } // if
    829834                        Parent::visit( objDecl );
     835                }
     836
     837                template< typename Visitor >
     838                void handleFuncDecl( FunctionDecl * funcDecl, Visitor & visitor ) {
     839                        maybeAccept( funcDecl->get_functionType(), visitor );
     840                        acceptAll( funcDecl->get_oldDecls(), visitor );
     841                        maybeAccept( funcDecl->get_statements(), visitor );
     842                }
     843
     844                void InsertDtors::visit( FunctionDecl * funcDecl ) {
     845                        // each function needs to have its own set of labels
     846                        ValueGuard< LabelFinder::LabelMap > oldLabels( labelVars );
     847                        labelVars.clear();
     848                        handleFuncDecl( funcDecl, finder );
     849
     850                        // all labels for this function have been collected, insert destructors as appropriate.
     851                        // can't be Parent::mutate, because ObjDeclCollector bottoms out on FunctionDecl
     852                        handleFuncDecl( funcDecl, *this );
    830853                }
    831854
     
    952975                        std::set_difference( usedUninit.begin(), usedUninit.end(), unhandled.begin(), unhandled.end(), std::inserter( diff, diff.begin() ) );
    953976                        for ( DeclarationWithType * member : diff ) {
    954                                 emit( "in ", CodeGen::genType( function->get_functionType(), function->get_name(), false ), ", field ", member->get_name(), " used before being constructed" );
     977                                emit( "in ", CodeGen::genPrettyType( function->get_functionType(), function->get_name() ), ", field ", member->get_name(), " used before being constructed" );
    955978                        }
    956979
     
    9971020                                                        }
    9981021                                                } catch ( SemanticError & error ) {
    999                                                         emit( "in ", CodeGen::genType( function->get_functionType(), function->get_name(), false ), ", field ", field->get_name(), " not explicitly ", isCtor ? "constructed" : "destructed",  " and no ", isCtor ? "default constructor" : "destructor", " found" );
     1022                                                        emit( "in ", CodeGen::genPrettyType( function->get_functionType(), function->get_name() ), ", field ", field->get_name(), " not explicitly ", isCtor ? "constructed" : "destructed",  " and no ", isCtor ? "default constructor" : "destructor", " found" );
    10001023                                                }
    10011024                                        }
  • src/ResolvExpr/AlternativeFinder.cc

    r424931d rea23d10  
    403403                        // End of actuals - Handle default values
    404404                        if ( SingleInit *si = dynamic_cast<SingleInit *>( defaultValue )) {
    405                                 // so far, only constant expressions are accepted as default values
    406                                 if ( ConstantExpr *cnstexpr = dynamic_cast<ConstantExpr *>( si->get_value()) ) {
    407                                         if ( Constant *cnst = dynamic_cast<Constant *>( cnstexpr->get_constant() ) ) {
    408                                                 if ( unify( formalType, cnst->get_type(), resultEnv, resultNeed, resultHave, openVars, indexer ) ) {
    409                                                         // xxx - Don't know if this is right
    410                                                         *out++ = cnstexpr->clone();
    411                                                         return true;
     405                                if ( CastExpr * castExpr = dynamic_cast< CastExpr * >( si->get_value() ) ) {
     406                                        // so far, only constant expressions are accepted as default values
     407                                        if ( ConstantExpr *cnstexpr = dynamic_cast<ConstantExpr *>( castExpr->get_arg() ) ) {
     408                                                if ( Constant *cnst = dynamic_cast<Constant *>( cnstexpr->get_constant() ) ) {
     409                                                        if ( unify( formalType, cnst->get_type(), resultEnv, resultNeed, resultHave, openVars, indexer ) ) {
     410                                                                *out++ = cnstexpr->clone();
     411                                                                return true;
     412                                                        } // if
    412413                                                } // if
    413414                                        } // if
    414                                 } // if
     415                                }
    415416                        } // if
    416417                        return false;
  • src/SymTab/Mangler.cc

    r424931d rea23d10  
    172172                        for ( std::list< Expression* >::const_iterator param = params.begin(); param != params.end(); ++param ) {
    173173                                TypeExpr *paramType = dynamic_cast< TypeExpr* >( *param );
    174                                 assert(paramType && "Aggregate parameters should be type expressions");
     174                                assertf(paramType, "Aggregate parameters should be type expressions: %s", toString(*param).c_str());
    175175                                maybeAccept( paramType->get_type(), *this );
    176176                        }
  • src/SymTab/Validate.cc

    r424931d rea23d10  
    696696                        FunctionDecl * newDecl = new FunctionDecl( ret->get_name(), ret->get_storageClass(), ret->get_linkage(), funtype, 0, ret->get_isInline(), ret->get_isNoreturn(), objDecl->get_attributes() );
    697697                        objDecl->get_attributes().clear();
     698                        objDecl->set_type( nullptr );
    698699                        delete objDecl;
    699700                        return newDecl;
  • src/main.cc

    r424931d rea23d10  
    7676        validp = false,
    7777        errorp = false,
    78         codegenp = false;
     78        codegenp = false,
     79        prettycodegenp = false;
    7980
    8081static void parse_cmdline( int argc, char *argv[], const char *& filename );
     
    309310                } // if
    310311
    311                 CodeGen::generate( translationUnit, *output, ! noprotop );
     312                CodeGen::generate( translationUnit, *output, ! noprotop, prettycodegenp );
    312313
    313314                CodeGen::FixMain::fix( *output, treep ? "../prelude/bootloader.c" : CFA_LIBDIR "/bootloader.c" );
     
    374375
    375376        int c;
    376         while ( (c = getopt_long( argc, argv, "abBcdefglmnpqrstTvyzD:F:", long_opts, &long_index )) != -1 ) {
     377        while ( (c = getopt_long( argc, argv, "abBcdefglmnpqrstTvyzZD:F:", long_opts, &long_index )) != -1 ) {
    377378                switch ( c ) {
    378379                  case Ast:
     
    450451                  case 'z':
    451452                        codegenp = true;
     453                        case 'Z':
     454                        prettycodegenp = true;
    452455                        break;
    453456                  case 'D':                                                                             // ignore -Dxxx
  • src/tests/.expect/32/declarationSpecifier.txt

    r424931d rea23d10  
    1 __attribute__ ((__malloc__,__nothrow__,__leaf__)) extern void *malloc(unsigned int __size);
     1__attribute__ ((__nothrow__,__leaf__,__malloc__)) extern void *malloc(unsigned int __size);
    22__attribute__ ((__nothrow__,__leaf__)) extern void free(void *__ptr);
    3 __attribute__ ((__noreturn__,__nothrow__,__leaf__)) extern void abort(void);
    4 __attribute__ ((__nonnull__(1),__nothrow__,__leaf__)) extern int atexit(void (*__func)(void));
    5 __attribute__ ((__noreturn__,__nothrow__,__leaf__)) extern void exit(int __status);
     3__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void abort(void);
     4__attribute__ ((__nothrow__,__leaf__,__nonnull__(1))) extern int atexit(void (*__func)(void));
     5__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void exit(int __status);
    66extern int printf(const char *__restrict __format, ...);
    77volatile const short __x1__CVs_1;
     
    629629}
    630630static inline int invoke_main(int argc, char* argv[], char* envp[]) { (void)argc; (void)argv; (void)envp; return __main__Fi_iPPCc__1(argc, argv); }
    631 __attribute__ ((__malloc__,__nothrow__,__leaf__)) extern void *malloc(unsigned int __size);
     631__attribute__ ((__nothrow__,__leaf__,__malloc__)) extern void *malloc(unsigned int __size);
    632632__attribute__ ((__nothrow__,__leaf__)) extern void free(void *__ptr);
    633 __attribute__ ((__noreturn__,__nothrow__,__leaf__)) extern void abort(void);
    634 __attribute__ ((__nonnull__(1),__nothrow__,__leaf__)) extern int atexit(void (*__func)(void));
    635 __attribute__ ((__noreturn__,__nothrow__,__leaf__)) extern void exit(int __status);
     633__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void abort(void);
     634__attribute__ ((__nothrow__,__leaf__,__nonnull__(1))) extern int atexit(void (*__func)(void));
     635__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void exit(int __status);
    636636extern int printf(const char *__restrict __format, ...);
    637637static inline int invoke_main(int argc, char **argv, char **envp);
  • src/tests/.expect/32/extension.txt

    r424931d rea23d10  
    1 __attribute__ ((__malloc__,__nothrow__,__leaf__)) extern void *malloc(unsigned int __size);
     1__attribute__ ((__nothrow__,__leaf__,__malloc__)) extern void *malloc(unsigned int __size);
    22__attribute__ ((__nothrow__,__leaf__)) extern void free(void *__ptr);
    3 __attribute__ ((__noreturn__,__nothrow__,__leaf__)) extern void abort(void);
    4 __attribute__ ((__nonnull__(1),__nothrow__,__leaf__)) extern int atexit(void (*__func)(void));
    5 __attribute__ ((__noreturn__,__nothrow__,__leaf__)) extern void exit(int __status);
     3__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void abort(void);
     4__attribute__ ((__nothrow__,__leaf__,__nonnull__(1))) extern int atexit(void (*__func)(void));
     5__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void exit(int __status);
    66extern int printf(const char *__restrict __format, ...);
    77__extension__ int __a__i_1;
     
    7777    __B__C2eE_1,
    7878};
     79__extension__ int __f__Fi___1();
     80__extension__ int i;
     81__extension__ int j;
    7982__extension__ int __fred__Fi_i__1(int __p__i_1){
    8083    int ___retval_fred__i_1;
     
    8386        __extension__ int __b__i_2;
    8487        __extension__ int __c__i_2;
     88        __extension__ int *__x__Pi_2;
     89        __extension__ int *__y__Pi_2;
     90        __extension__ int *__z__Pi_2;
    8591    };
    8692    int __i__i_2 = ((int )(__extension__ __a__i_1+__extension__ 3));
     
    94100    ((void)((_tmp_cp_ret0=__extension__ __fred__Fi_i__1(3)) , _tmp_cp_ret0));
    95101    ((void)((*((int *)(&_tmp_cp_ret0)))) /* ^?{} */);
     102    __extension__ int __mary__Fi_i__2(int __p__i_2){
     103        int ___retval_mary__i_2;
     104    }
    96105    ((void)__extension__ sizeof(3));
    97106    ((void)__extension__ (((int )(3!=((int )0))) || ((int )(4!=((int )0)))));
  • src/tests/.expect/32/gccExtensions.txt

    r424931d rea23d10  
    1 __attribute__ ((__malloc__,__nothrow__,__leaf__)) extern void *malloc(unsigned int __size);
     1__attribute__ ((__nothrow__,__leaf__,__malloc__)) extern void *malloc(unsigned int __size);
    22__attribute__ ((__nothrow__,__leaf__)) extern void free(void *__ptr);
    3 __attribute__ ((__noreturn__,__nothrow__,__leaf__)) extern void abort(void);
    4 __attribute__ ((__nonnull__(1),__nothrow__,__leaf__)) extern int atexit(void (*__func)(void));
    5 __attribute__ ((__noreturn__,__nothrow__,__leaf__)) extern void exit(int __status);
     3__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void abort(void);
     4__attribute__ ((__nothrow__,__leaf__,__nonnull__(1))) extern int atexit(void (*__func)(void));
     5__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void exit(int __status);
    66extern int printf(const char *__restrict __format, ...);
    77extern int __x__i_1 asm ( "xx" );
     
    166166}
    167167static inline int invoke_main(int argc, char* argv[], char* envp[]) { (void)argc; (void)argv; (void)envp; return __main__Fi_iPPCc__1(argc, argv); }
    168 __attribute__ ((__malloc__,__nothrow__,__leaf__)) extern void *malloc(unsigned int __size);
     168__attribute__ ((__nothrow__,__leaf__,__malloc__)) extern void *malloc(unsigned int __size);
    169169__attribute__ ((__nothrow__,__leaf__)) extern void free(void *__ptr);
    170 __attribute__ ((__noreturn__,__nothrow__,__leaf__)) extern void abort(void);
    171 __attribute__ ((__nonnull__(1),__nothrow__,__leaf__)) extern int atexit(void (*__func)(void));
    172 __attribute__ ((__noreturn__,__nothrow__,__leaf__)) extern void exit(int __status);
     170__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void abort(void);
     171__attribute__ ((__nothrow__,__leaf__,__nonnull__(1))) extern int atexit(void (*__func)(void));
     172__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void exit(int __status);
    173173extern int printf(const char *__restrict __format, ...);
    174174static inline int invoke_main(int argc, char **argv, char **envp);
Note: See TracChangeset for help on using the changeset viewer.