Changes in / [ea23d10:424931d]
- Location:
- src
- Files:
-
- 15 edited
-
CodeGen/CodeGenerator.cc (modified) (12 diffs)
-
CodeGen/CodeGenerator.h (modified) (2 diffs)
-
CodeGen/GenType.cc (modified) (8 diffs)
-
CodeGen/GenType.h (modified) (1 diff)
-
CodeGen/Generate.cc (modified) (2 diffs)
-
CodeGen/Generate.h (modified) (2 diffs)
-
GenPoly/Box.cc (modified) (1 diff)
-
InitTweak/FixInit.cc (modified) (9 diffs)
-
ResolvExpr/AlternativeFinder.cc (modified) (1 diff)
-
SymTab/Mangler.cc (modified) (1 diff)
-
SymTab/Validate.cc (modified) (1 diff)
-
main.cc (modified) (4 diffs)
-
tests/.expect/32/declarationSpecifier.txt (modified) (2 diffs)
-
tests/.expect/32/extension.txt (modified) (4 diffs)
-
tests/.expect/32/gccExtensions.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
rea23d10 r424931d 89 89 } 90 90 91 CodeGenerator::CodeGenerator( std::ostream & os, bool pretty ) : indent( *this), cur_indent( 0 ), insideFunction( false ), output( os ), printLabels( *this ), pretty( pretty) {}91 CodeGenerator::CodeGenerator( std::ostream & os, bool mangle ) : indent( *this), cur_indent( 0 ), insideFunction( false ), output( os ), printLabels( *this ), mangle( mangle ) {} 92 92 93 93 CodeGenerator::CodeGenerator( std::ostream & os, std::string init, int indentation, bool infunp ) … … 102 102 103 103 string CodeGenerator::mangleName( DeclarationWithType * decl ) { 104 if ( pretty) return decl->get_name();104 if ( ! mangle ) return decl->get_name(); 105 105 if ( decl->get_mangleName() != "" ) { 106 106 // need to incorporate scope level in order to differentiate names for destructors … … 140 140 output << "_Noreturn "; 141 141 } // if 142 output << genType( functionDecl->get_functionType(), mangleName( functionDecl ) , pretty);142 output << genType( functionDecl->get_functionType(), mangleName( functionDecl ) ); 143 143 144 144 // how to get this to the Functype? … … 161 161 162 162 handleStorageClass( objectDecl ); 163 output << genType( objectDecl->get_type(), mangleName( objectDecl ) , pretty);163 output << genType( objectDecl->get_type(), mangleName( objectDecl ) ); 164 164 165 165 asmName( objectDecl ); … … 178 178 void CodeGenerator::handleAggregate( AggregateDecl * aggDecl ) { 179 179 genAttributes( aggDecl->get_attributes() ); 180 180 181 181 if ( aggDecl->get_name() != "" ) 182 182 output << aggDecl->get_name(); … … 249 249 assert( false && "Typedefs are removed and substituted in earlier passes." ); 250 250 //output << "typedef "; 251 //output << genType( typeDecl->get_base(), typeDecl->get_name() , pretty);251 //output << genType( typeDecl->get_base(), typeDecl->get_name() ); 252 252 } 253 253 … … 258 258 output << "extern unsigned long " << typeDecl->get_name(); 259 259 if ( typeDecl->get_base() ) { 260 output << " = sizeof( " << genType( typeDecl->get_base(), "" , pretty) << " )";260 output << " = sizeof( " << genType( typeDecl->get_base(), "" ) << " )"; 261 261 } // if 262 262 } … … 552 552 // at least one result type of cast, but not an lvalue 553 553 output << "("; 554 output << genType( castExpr->get_result(), "" , pretty);554 output << genType( castExpr->get_result(), "" ); 555 555 output << ")"; 556 556 } else { … … 592 592 output << "sizeof("; 593 593 if ( sizeofExpr->get_isType() ) { 594 output << genType( sizeofExpr->get_type(), "" , pretty);594 output << genType( sizeofExpr->get_type(), "" ); 595 595 } else { 596 596 sizeofExpr->get_expr()->accept( *this ); … … 604 604 output << "__alignof__("; 605 605 if ( alignofExpr->get_isType() ) { 606 output << genType( alignofExpr->get_type(), "" , pretty);606 output << genType( alignofExpr->get_type(), "" ); 607 607 } else { 608 608 alignofExpr->get_expr()->accept( *this ); … … 618 618 // use GCC builtin 619 619 output << "__builtin_offsetof("; 620 output << genType( offsetofExpr->get_type(), "" , pretty);620 output << genType( offsetofExpr->get_type(), "" ); 621 621 output << ", " << mangleName( offsetofExpr->get_member() ); 622 622 output << ")"; … … 680 680 void CodeGenerator::visit( CompoundLiteralExpr *compLitExpr ) { 681 681 assert( compLitExpr->get_type() && dynamic_cast< ListInit * > ( compLitExpr->get_initializer() ) ); 682 output << "(" << genType( compLitExpr->get_type(), "" , pretty) << ")";682 output << "(" << genType( compLitExpr->get_type(), "" ) << ")"; 683 683 compLitExpr->get_initializer()->accept( *this ); 684 684 } -
src/CodeGen/CodeGenerator.h
rea23d10 r424931d 30 30 static int tabsize; 31 31 32 CodeGenerator( std::ostream &os, bool pretty = false );32 CodeGenerator( std::ostream &os, bool mangle = true ); 33 33 CodeGenerator( std::ostream &os, std::string, int indent = 0, bool infun = false ); 34 34 CodeGenerator( std::ostream &os, char *, int indent = 0, bool infun = false ); … … 119 119 std::ostream &output; 120 120 LabelPrinter printLabels; 121 bool pretty = false; // pretty print121 bool mangle = true; 122 122 123 123 void printDesignators( std::list< Expression * > & ); -
src/CodeGen/GenType.cc
rea23d10 r424931d 28 28 class GenType : public Visitor { 29 29 public: 30 GenType( const std::string &typeString, bool pretty = false );30 GenType( const std::string &typeString, bool mangle = true ); 31 31 std::string get_typeString() const { return typeString; } 32 32 void set_typeString( const std::string &newValue ) { typeString = newValue; } … … 51 51 52 52 std::string typeString; 53 bool pretty = false; // pretty print53 bool mangle = true; 54 54 }; 55 55 56 std::string genType( Type *type, const std::string &baseString, bool pretty) {57 GenType gt( baseString, pretty);56 std::string genType( Type *type, const std::string &baseString, bool mangle ) { 57 GenType gt( baseString, mangle ); 58 58 std::ostringstream os; 59 59 60 60 if ( ! type->get_attributes().empty() ) { 61 CodeGenerator cg( os, pretty);61 CodeGenerator cg( os, mangle ); 62 62 cg.genAttributes( type->get_attributes() ); 63 63 } // if … … 67 67 } 68 68 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 ) {} 69 GenType::GenType( const std::string &typeString, bool mangle ) : typeString( typeString ), mangle( mangle ) {} 74 70 75 71 void GenType::visit( VoidType *voidType ) { … … 112 108 } // if 113 109 if ( dimension != 0 ) { 114 CodeGenerator cg( os, pretty);110 CodeGenerator cg( os, mangle ); 115 111 dimension->accept( cg ); 116 112 } else if ( isVarLen ) { … … 166 162 } // if 167 163 } else { 168 CodeGenerator cg( os, pretty);164 CodeGenerator cg( os, mangle ); 169 165 os << "(" ; 170 166 … … 207 203 208 204 void GenType::visit( TupleType * tupleType ) { 209 assertf( pretty, "Tuple types should not make it to Code Gen." );205 assertf( ! mangle, "Tuple types should not make it to Code Gen." ); 210 206 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;220 207 } 221 208 … … 227 214 void GenType::visit( ZeroType *zeroType ) { 228 215 // ideally these wouldn't hit codegen at all, but should be safe to make them ints 229 typeString = (pretty ? "zero_t " : "long int ")+ typeString;216 typeString = "long int " + typeString; 230 217 handleQualifiers( zeroType ); 231 218 } … … 233 220 void GenType::visit( OneType *oneType ) { 234 221 // ideally these wouldn't hit codegen at all, but should be safe to make them ints 235 typeString = (pretty ? "one_t " : "long int ")+ typeString;222 typeString = "long int " + typeString; 236 223 handleQualifiers( oneType ); 237 224 } -
src/CodeGen/GenType.h
rea23d10 r424931d 21 21 22 22 namespace CodeGen { 23 std::string genType( Type *type, const std::string &baseString, bool pretty = false ); 24 std::string genPrettyType( Type * type, const std::string & baseString ); 23 std::string genType( Type *type, const std::string &baseString, bool mangle = true ); 25 24 } // namespace CodeGen 26 25 -
src/CodeGen/Generate.cc
rea23d10 r424931d 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // Generate.cc -- 7 // Generate.cc -- 8 8 // 9 9 // Author : Richard C. Bilson … … 26 26 27 27 namespace CodeGen { 28 void generate( std::list< Declaration* > translationUnit, std::ostream &os, bool doIntrinsics , bool pretty) {29 CodeGen::CodeGenerator cgv( os , pretty);28 void generate( std::list< Declaration* > translationUnit, std::ostream &os, bool doIntrinsics ) { 29 CodeGen::CodeGenerator cgv( os ); 30 30 31 31 for ( std::list<Declaration *>::iterator i = translationUnit.begin(); i != translationUnit.end(); i++ ) { -
src/CodeGen/Generate.h
rea23d10 r424931d 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // Generate.h -- 7 // Generate.h -- 8 8 // 9 9 // Author : Richard C. Bilson … … 24 24 namespace CodeGen { 25 25 /// Generates code 26 void generate( std::list< Declaration* > translationUnit, std::ostream &os, bool doIntrinsics , bool pretty);26 void generate( std::list< Declaration* > translationUnit, std::ostream &os, bool doIntrinsics ); 27 27 } // namespace CodeGen 28 28 -
src/GenPoly/Box.cc
rea23d10 r424931d 1307 1307 } 1308 1308 } 1309 // errors should have been caught by this point, remove initializers from parameters to allow correct codegen of default arguments1310 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 }1316 1309 return functionDecl; 1317 1310 } -
src/InitTweak/FixInit.cc
rea23d10 r424931d 104 104 virtual void visit( CompoundStmt *compoundStmt ) override; 105 105 virtual void visit( DeclStmt *stmt ) override; 106 107 // don't go into other functions108 virtual void visit( FunctionDecl *decl ) override {}109 110 106 protected: 111 107 ObjectSet curVars; … … 170 166 typedef std::list< OrderedDecls > OrderedDeclsStack; 171 167 172 InsertDtors( LabelFinder & finder ) : finder( finder ),labelVars( finder.vars ) {}168 InsertDtors( LabelFinder & finder ) : labelVars( finder.vars ) {} 173 169 174 170 using Parent::visit; 175 171 176 172 virtual void visit( ObjectDecl * objDecl ) override; 177 virtual void visit( FunctionDecl * funcDecl ) override;178 173 179 174 virtual void visit( CompoundStmt * compoundStmt ) override; … … 183 178 void handleGoto( BranchStmt * stmt ); 184 179 185 LabelFinder & finder;186 180 LabelFinder::LabelMap & labelVars; 187 181 OrderedDeclsStack reverseDeclOrder; … … 324 318 LabelFinder finder; 325 319 InsertDtors inserter( finder ); 320 acceptAll( translationUnit, finder ); 326 321 acceptAll( translationUnit, inserter ); 327 322 } … … 783 778 } 784 779 785 void ObjDeclCollector::visit( CompoundStmt * compoundStmt ) {780 void ObjDeclCollector::visit( CompoundStmt *compoundStmt ) { 786 781 std::set< ObjectDecl * > prevVars = curVars; 787 782 Parent::visit( compoundStmt ); … … 789 784 } 790 785 791 void ObjDeclCollector::visit( DeclStmt * stmt ) {786 void ObjDeclCollector::visit( DeclStmt *stmt ) { 792 787 // keep track of all variables currently in scope 793 788 if ( ObjectDecl * objDecl = dynamic_cast< ObjectDecl * > ( stmt->get_decl() ) ) { … … 833 828 } // if 834 829 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 labels846 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 FunctionDecl852 handleFuncDecl( funcDecl, *this );853 830 } 854 831 … … 975 952 std::set_difference( usedUninit.begin(), usedUninit.end(), unhandled.begin(), unhandled.end(), std::inserter( diff, diff.begin() ) ); 976 953 for ( DeclarationWithType * member : diff ) { 977 emit( "in ", CodeGen::gen PrettyType( function->get_functionType(), function->get_name()), ", field ", member->get_name(), " used before being constructed" );954 emit( "in ", CodeGen::genType( function->get_functionType(), function->get_name(), false ), ", field ", member->get_name(), " used before being constructed" ); 978 955 } 979 956 … … 1020 997 } 1021 998 } catch ( SemanticError & error ) { 1022 emit( "in ", CodeGen::gen PrettyType( function->get_functionType(), function->get_name()), ", field ", field->get_name(), " not explicitly ", isCtor ? "constructed" : "destructed", " and no ", isCtor ? "default constructor" : "destructor", " found" );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" ); 1023 1000 } 1024 1001 } -
src/ResolvExpr/AlternativeFinder.cc
rea23d10 r424931d 403 403 // End of actuals - Handle default values 404 404 if ( SingleInit *si = dynamic_cast<SingleInit *>( defaultValue )) { 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 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; 413 412 } // if 414 413 } // if 415 } 414 } // if 416 415 } // if 417 416 return false; -
src/SymTab/Mangler.cc
rea23d10 r424931d 172 172 for ( std::list< Expression* >::const_iterator param = params.begin(); param != params.end(); ++param ) { 173 173 TypeExpr *paramType = dynamic_cast< TypeExpr* >( *param ); 174 assert f(paramType, "Aggregate parameters should be type expressions: %s", toString(*param).c_str());174 assert(paramType && "Aggregate parameters should be type expressions"); 175 175 maybeAccept( paramType->get_type(), *this ); 176 176 } -
src/SymTab/Validate.cc
rea23d10 r424931d 696 696 FunctionDecl * newDecl = new FunctionDecl( ret->get_name(), ret->get_storageClass(), ret->get_linkage(), funtype, 0, ret->get_isInline(), ret->get_isNoreturn(), objDecl->get_attributes() ); 697 697 objDecl->get_attributes().clear(); 698 objDecl->set_type( nullptr );699 698 delete objDecl; 700 699 return newDecl; -
src/main.cc
rea23d10 r424931d 76 76 validp = false, 77 77 errorp = false, 78 codegenp = false, 79 prettycodegenp = false; 78 codegenp = false; 80 79 81 80 static void parse_cmdline( int argc, char *argv[], const char *& filename ); … … 310 309 } // if 311 310 312 CodeGen::generate( translationUnit, *output, ! noprotop , prettycodegenp);311 CodeGen::generate( translationUnit, *output, ! noprotop ); 313 312 314 313 CodeGen::FixMain::fix( *output, treep ? "../prelude/bootloader.c" : CFA_LIBDIR "/bootloader.c" ); … … 375 374 376 375 int c; 377 while ( (c = getopt_long( argc, argv, "abBcdefglmnpqrstTvyz ZD:F:", long_opts, &long_index )) != -1 ) {376 while ( (c = getopt_long( argc, argv, "abBcdefglmnpqrstTvyzD:F:", long_opts, &long_index )) != -1 ) { 378 377 switch ( c ) { 379 378 case Ast: … … 451 450 case 'z': 452 451 codegenp = true; 453 case 'Z':454 prettycodegenp = true;455 452 break; 456 453 case 'D': // ignore -Dxxx -
src/tests/.expect/32/declarationSpecifier.txt
rea23d10 r424931d 1 __attribute__ ((__ nothrow__,__leaf__,__malloc__)) extern void *malloc(unsigned int __size);1 __attribute__ ((__malloc__,__nothrow__,__leaf__)) extern void *malloc(unsigned int __size); 2 2 __attribute__ ((__nothrow__,__leaf__)) extern void free(void *__ptr); 3 __attribute__ ((__no throw__,__leaf__,__noreturn__)) extern void abort(void);4 __attribute__ ((__no throw__,__leaf__,__nonnull__(1))) extern int atexit(void (*__func)(void));5 __attribute__ ((__no throw__,__leaf__,__noreturn__)) extern void exit(int __status);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); 6 6 extern int printf(const char *__restrict __format, ...); 7 7 volatile const short __x1__CVs_1; … … 629 629 } 630 630 static 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__ ((__ nothrow__,__leaf__,__malloc__)) extern void *malloc(unsigned int __size);631 __attribute__ ((__malloc__,__nothrow__,__leaf__)) extern void *malloc(unsigned int __size); 632 632 __attribute__ ((__nothrow__,__leaf__)) extern void free(void *__ptr); 633 __attribute__ ((__no throw__,__leaf__,__noreturn__)) extern void abort(void);634 __attribute__ ((__no throw__,__leaf__,__nonnull__(1))) extern int atexit(void (*__func)(void));635 __attribute__ ((__no throw__,__leaf__,__noreturn__)) extern void exit(int __status);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); 636 636 extern int printf(const char *__restrict __format, ...); 637 637 static inline int invoke_main(int argc, char **argv, char **envp); -
src/tests/.expect/32/extension.txt
rea23d10 r424931d 1 __attribute__ ((__ nothrow__,__leaf__,__malloc__)) extern void *malloc(unsigned int __size);1 __attribute__ ((__malloc__,__nothrow__,__leaf__)) extern void *malloc(unsigned int __size); 2 2 __attribute__ ((__nothrow__,__leaf__)) extern void free(void *__ptr); 3 __attribute__ ((__no throw__,__leaf__,__noreturn__)) extern void abort(void);4 __attribute__ ((__no throw__,__leaf__,__nonnull__(1))) extern int atexit(void (*__func)(void));5 __attribute__ ((__no throw__,__leaf__,__noreturn__)) extern void exit(int __status);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); 6 6 extern int printf(const char *__restrict __format, ...); 7 7 __extension__ int __a__i_1; … … 77 77 __B__C2eE_1, 78 78 }; 79 __extension__ int __f__Fi___1();80 __extension__ int i;81 __extension__ int j;82 79 __extension__ int __fred__Fi_i__1(int __p__i_1){ 83 80 int ___retval_fred__i_1; … … 86 83 __extension__ int __b__i_2; 87 84 __extension__ int __c__i_2; 88 __extension__ int *__x__Pi_2;89 __extension__ int *__y__Pi_2;90 __extension__ int *__z__Pi_2;91 85 }; 92 86 int __i__i_2 = ((int )(__extension__ __a__i_1+__extension__ 3)); … … 100 94 ((void)((_tmp_cp_ret0=__extension__ __fred__Fi_i__1(3)) , _tmp_cp_ret0)); 101 95 ((void)((*((int *)(&_tmp_cp_ret0)))) /* ^?{} */); 102 __extension__ int __mary__Fi_i__2(int __p__i_2){103 int ___retval_mary__i_2;104 }105 96 ((void)__extension__ sizeof(3)); 106 97 ((void)__extension__ (((int )(3!=((int )0))) || ((int )(4!=((int )0))))); -
src/tests/.expect/32/gccExtensions.txt
rea23d10 r424931d 1 __attribute__ ((__ nothrow__,__leaf__,__malloc__)) extern void *malloc(unsigned int __size);1 __attribute__ ((__malloc__,__nothrow__,__leaf__)) extern void *malloc(unsigned int __size); 2 2 __attribute__ ((__nothrow__,__leaf__)) extern void free(void *__ptr); 3 __attribute__ ((__no throw__,__leaf__,__noreturn__)) extern void abort(void);4 __attribute__ ((__no throw__,__leaf__,__nonnull__(1))) extern int atexit(void (*__func)(void));5 __attribute__ ((__no throw__,__leaf__,__noreturn__)) extern void exit(int __status);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); 6 6 extern int printf(const char *__restrict __format, ...); 7 7 extern int __x__i_1 asm ( "xx" ); … … 166 166 } 167 167 static 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__ ((__ nothrow__,__leaf__,__malloc__)) extern void *malloc(unsigned int __size);168 __attribute__ ((__malloc__,__nothrow__,__leaf__)) extern void *malloc(unsigned int __size); 169 169 __attribute__ ((__nothrow__,__leaf__)) extern void free(void *__ptr); 170 __attribute__ ((__no throw__,__leaf__,__noreturn__)) extern void abort(void);171 __attribute__ ((__no throw__,__leaf__,__nonnull__(1))) extern int atexit(void (*__func)(void));172 __attribute__ ((__no throw__,__leaf__,__noreturn__)) extern void exit(int __status);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); 173 173 extern int printf(const char *__restrict __format, ...); 174 174 static inline int invoke_main(int argc, char **argv, char **envp);
Note:
See TracChangeset
for help on using the changeset viewer.