Changeset b3c36f4
- Timestamp:
- Jun 5, 2017, 11:43:18 AM (7 years ago)
- 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:
- 7e003011
- Parents:
- fa21ac9
- Location:
- src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeTools/TrackLoc.cc
rfa21ac9 rb3c36f4 85 85 } 86 86 87 void postvisit( BaseSyntaxNode * node) {87 void postvisit( __attribute__((unused)) BaseSyntaxNode * node ) { 88 88 parents.pop(); 89 89 } -
src/Common/Assert.cc
rfa21ac9 rb3c36f4 21 21 extern const char * __progname; // global name of running executable (argv[0]) 22 22 23 #define CFA_ASSERT_FMT "*CFA assertion error* from program \"%s\" in \"%s\" at line %d in file \"%s\""23 #define CFA_ASSERT_FMT "*CFA assertion error* \"%s\" from program \"%s\" in \"%s\" at line %d in file \"%s\"" 24 24 25 25 // called by macro assert in assert.h 26 26 void __assert_fail( const char *assertion, const char *file, unsigned int line, const char *function ) { 27 fprintf( stderr, CFA_ASSERT_FMT ".\n", __progname, function, line, file );27 fprintf( stderr, CFA_ASSERT_FMT ".\n", assertion, __progname, function, line, file ); 28 28 abort(); 29 29 } … … 31 31 // called by macro assertf 32 32 void __assert_fail_f( const char *assertion, const char *file, unsigned int line, const char *function, const char *fmt, ... ) { 33 fprintf( stderr, CFA_ASSERT_FMT ": ", __progname, function, line, file );33 fprintf( stderr, CFA_ASSERT_FMT ": ", assertion, __progname, function, line, file ); 34 34 va_list args; 35 35 va_start( args, fmt ); -
src/Common/PassVisitor.proto.h
rfa21ac9 rb3c36f4 23 23 24 24 template<typename pass_type, typename node_type> 25 static inline void previsit_impl( __attribute__((unused)) pass_type& pass, node_type * node, __attribute__((unused)) long unused ) {}25 static inline void previsit_impl( __attribute__((unused)) pass_type& pass, __attribute__((unused)) node_type * node, __attribute__((unused)) long unused ) {} 26 26 27 27 … … 32 32 33 33 template<typename pass_type, typename node_type> 34 static inline void postvisit_impl( __attribute__((unused)) pass_type& pass, node_type * node, __attribute__((unused)) long unused ) {}34 static inline void postvisit_impl( __attribute__((unused)) pass_type& pass, __attribute__((unused)) node_type * node, __attribute__((unused)) long unused ) {} 35 35 36 36 // Mutate … … 41 41 42 42 template<typename pass_type, typename node_type> 43 static inline void premutate_impl( __attribute__((unused)) pass_type& pass, node_type * node, __attribute__((unused)) long unused ) {}43 static inline void premutate_impl( __attribute__((unused)) pass_type& pass, __attribute__((unused)) node_type * node, __attribute__((unused)) long unused ) {} 44 44 45 45 … … 71 71 72 72 // Fields 73 #define FIELD_PTR( type, name ) 74 template<typename pass_type> 75 static inline auto name##_impl( pass_type& pass, __attribute__((unused)) int unused ) ->decltype( &pass.name ) { return &pass.name; } 76 77 template<typename pass_type> 73 #define FIELD_PTR( type, name ) \ 74 template<typename pass_type> \ 75 static inline auto name##_impl( pass_type& pass, __attribute__((unused)) int unused ) ->decltype( &pass.name ) { return &pass.name; } \ 76 \ 77 template<typename pass_type> \ 78 78 static inline type * name##_impl( __attribute__((unused)) pass_type& pass, __attribute__((unused)) long unused ) { return nullptr;} \ 79 79 -
src/Parser/ParseNode.h
rfa21ac9 rb3c36f4 61 61 } 62 62 63 virtual void print( std::ostream &os,int indent = 0 ) const {}64 virtual void printList( std::ostream &os,int indent = 0 ) const {}63 virtual void print( __attribute__((unused)) std::ostream &os, __attribute__((unused)) int indent = 0 ) const {} 64 virtual void printList( __attribute__((unused)) std::ostream &os, __attribute__((unused)) int indent = 0 ) const {} 65 65 66 66 static int indent_by; … … 113 113 ExpressionNode * set_extension( bool exten ) { extension = exten; return this; } 114 114 115 virtual void print( std::ostream &os,int indent = 0 ) const override {}116 void printOneLine( std::ostream &os,int indent = 0 ) const {}115 virtual void print( __attribute__((unused)) std::ostream &os, __attribute__((unused)) int indent = 0 ) const override {} 116 void printOneLine( __attribute__((unused)) std::ostream &os, __attribute__((unused)) int indent = 0 ) const {} 117 117 118 118 template<typename T> … … 283 283 } 284 284 285 virtual void print( std::ostream &os,int indent = 0 ) const override;286 virtual void printList( std::ostream &os,int indent = 0 ) const override;285 virtual void print( __attribute__((unused)) std::ostream &os, __attribute__((unused)) int indent = 0 ) const override; 286 virtual void printList( __attribute__((unused)) std::ostream &os, __attribute__((unused)) int indent = 0 ) const override; 287 287 288 288 Declaration * build() const; … … 363 363 virtual StatementNode * append_last_case( StatementNode * ); 364 364 365 virtual void print( std::ostream &os,int indent = 0 ) const override {}366 virtual void printList( std::ostream &os,int indent = 0 ) const override {}365 virtual void print( __attribute__((unused)) std::ostream &os, __attribute__((unused)) int indent = 0 ) const override {} 366 virtual void printList( __attribute__((unused)) std::ostream &os, __attribute__((unused)) int indent = 0 ) const override {} 367 367 private: 368 368 std::unique_ptr<Statement> stmt; -
src/SynTree/Statement.cc
rfa21ac9 rb3c36f4 30 30 Statement::Statement( std::list<Label> _labels ) : labels( _labels ) {} 31 31 32 void Statement::print( std::ostream &,int indent ) const {}32 void Statement::print( __attribute__((unused)) std::ostream &, __attribute__((unused)) int indent ) const {} 33 33 34 34 Statement::~Statement() {} … … 365 365 NullStmt::NullStmt() : CompoundStmt( std::list<Label>() ) {} 366 366 367 void NullStmt::print( std::ostream &os, int indent ) const {367 void NullStmt::print( std::ostream &os, __attribute__((unused)) int indent ) const { 368 368 os << "Null Statement" << endl ; 369 369 } -
src/SynTree/Type.h
rfa21ac9 rb3c36f4 334 334 virtual void print( std::ostream & os, int indent = 0 ) const; 335 335 336 virtual void lookup( const std::string & name,std::list< Declaration* > & foundDecls ) const {}336 virtual void lookup( __attribute__((unused)) const std::string & name, __attribute__((unused)) std::list< Declaration* > & foundDecls ) const {} 337 337 protected: 338 338 virtual std::string typeString() const = 0; -
src/SynTree/Visitor.cc
rfa21ac9 rb3c36f4 122 122 } 123 123 124 void Visitor::visit( BranchStmt *branchStmt ) {124 void Visitor::visit( __attribute__((unused)) BranchStmt *branchStmt ) { 125 125 } 126 126 … … 143 143 } 144 144 145 void Visitor::visit( NullStmt *nullStmt ) {145 void Visitor::visit( __attribute__((unused)) NullStmt *nullStmt ) { 146 146 } 147 147 … … 445 445 446 446 447 void Visitor::visit( Subrange *subrange ) {}448 449 450 void Visitor::visit( Constant *constant ) {}447 void Visitor::visit( __attribute__((unused)) Subrange *subrange ) {} 448 449 450 void Visitor::visit( __attribute__((unused)) Constant *constant ) {} 451 451 // Local Variables: // 452 452 // tab-width: 4 // -
src/driver/cc1.cc
rfa21ac9 rb3c36f4 84 84 85 85 86 void sigTermHandler( int signal ) {86 void sigTermHandler( __attribute__((unused)) int signal ) { 87 87 if ( tmpfilefd != -1 ) { // RACE, file created ? 88 88 rmtmpfile(); // remove … … 469 469 470 470 471 int main( const int argc, const char * const argv[], const char * const env[] ) {471 int main( const int argc, const char * const argv[], __attribute__((unused)) const char * const env[] ) { 472 472 #ifdef __DEBUG_H__ 473 473 for ( int i = 0; env[i] != NULL; i += 1 ) { -
src/main.cc
rfa21ac9 rb3c36f4 146 146 } // sigSegvBusHandler 147 147 148 void sigAbortHandler( int sig_num ) {148 void sigAbortHandler( __attribute__((unused)) int sig_num ) { 149 149 backtrace( 6 ); // skip first 6 stack frames 150 150 signal( SIGABRT, SIG_DFL); // reset default signal handler
Note: See TracChangeset
for help on using the changeset viewer.