Changes in / [0a73148:6b8b767]
- Location:
- src
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/SemanticError.h
r0a73148 r6b8b767 56 56 {"reference-conversion" , "rvalue to reference conversion of rvalue: %s" , Severity::Warn}, 57 57 {"qualifiers-zero_t-one_t", "questionable use of type qualifier %s with %s", Severity::Warn}, 58 {"aggregate-forward-decl" , "forward declaration of nested aggregate: %s" , Severity::Warn},59 58 }; 60 59 … … 63 62 RvalueToReferenceConversion, 64 63 BadQualifiersZeroOne, 65 AggrForwardDecl,66 64 NUMBER_OF_WARNINGS, //This MUST be the last warning 67 65 }; -
src/Parser/DeclarationNode.cc
r0a73148 r6b8b767 1003 1003 // }; 1004 1004 if ( ! (extracted && decl->name == "" && ! anon) ) { 1005 if (decl->name == "") {1006 if ( DeclarationWithType * dwt = dynamic_cast<DeclarationWithType *>( decl ) ) {1007 if ( ReferenceToType * aggr = dynamic_cast<ReferenceToType *>( dwt->get_type() ) ) {1008 if ( aggr->name.find("anonymous") == std::string::npos ) {1009 bool isInline = false;1010 if (cur->type->kind == TypeData::Aggregate || cur->type->kind == TypeData::AggregateInst) {1011 if (cur->type->kind == TypeData::Aggregate) {1012 isInline = cur->type->aggregate.inLine;1013 } else {1014 isInline = cur->type->aggInst.inLine;1015 if ( TypeData * aggr = cur->type->aggInst.aggregate ) {1016 if ( aggr->kind == TypeData::Aggregate ) {1017 isInline = isInline || aggr->aggregate.inLine;1018 }1019 }1020 }1021 }1022 if (! isInline) {1023 // temporary: warn about anonymous member declarations of named types, since this conflicts with the syntax for the forward declaration of an anonymous type1024 SemanticWarning( cur->location, Warning::AggrForwardDecl, aggr->name.c_str() );1025 }1026 }1027 }1028 }1029 }1030 1005 decl->location = cur->location; 1031 1006 * out++ = decl; -
src/Parser/TypedefTable.cc
r0a73148 r6b8b767 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // TypedefTable.cc -- 7 // TypedefTable.cc -- 8 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Sat May 16 15:20:13 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jul 13 18:35:54 201813 // Update Count : 25 712 // Last Modified On : Thu Jul 12 16:16:24 2018 13 // Update Count : 256 14 14 // 15 15 -
src/Parser/parser.yy
r0a73148 r6b8b767 2307 2307 { $$ = new ExpressionNode( new TypeExpr( maybeMoveBuildType( $1 ) ) ); } 2308 2308 | assignment_expression 2309 { SemanticError( yylloc, toString("Expression generic parameters are currently unimplemented: ", $1->build()) ); $$ = nullptr; }2310 2309 | type_list ',' type 2311 2310 { $$ = (ExpressionNode *)( $1->set_last( new ExpressionNode( new TypeExpr( maybeMoveBuildType( $3 ) ) ) ) ); } 2312 2311 | type_list ',' assignment_expression 2313 { SemanticError( yylloc, toString("Expression generic parameters are currently unimplemented: ", $3->build()) ); $$ = nullptr; } 2314 // { $$ = (ExpressionNode *)( $1->set_last( $3 )); } 2312 { $$ = (ExpressionNode *)( $1->set_last( $3 )); } 2315 2313 ; 2316 2314 -
src/ResolvExpr/AlternativeFinder.cc
r0a73148 r6b8b767 482 482 template< typename ForwardIterator, typename OutputIterator > 483 483 void inferRecursive( ForwardIterator begin, ForwardIterator end, const Alternative &newAlt, OpenVarSet &openVars, const SymTab::Indexer &decls, const AssertionSet &newNeed, int level, const SymTab::Indexer &indexer, OutputIterator out ) { 484 if ( newAlt.cost == Cost::infinity ) return; // don't proceed down this dead end485 484 if ( begin == end ) { 486 485 if ( newNeed.empty() ) { … … 1186 1185 std::cerr << "bindings are:" << std::endl; 1187 1186 withFunc.env.print( std::cerr, 8 ); 1188 std::cerr << "cost is: " << withFunc.cost << std::endl;1189 1187 std::cerr << "cost of conversion is:" << cvtCost << std::endl; 1190 1188 ) -
src/ResolvExpr/CommonType.cc
r0a73148 r6b8b767 267 267 result = otherPointer->clone(); 268 268 } // if 269 strict_dynamic_cast<PointerType*>(result)->base->get_qualifiers() = tq1 | tq2;269 result->get_qualifiers() = tq1 | tq2; 270 270 } else { 271 271 /// std::cerr << "place for ptr-to-type" << std::endl; … … 304 304 result = otherRef->clone(); 305 305 } // if 306 strict_dynamic_cast<ReferenceType*>(result)->base->get_qualifiers() = tq1 | tq2;306 result->get_qualifiers() = tq1 | tq2; 307 307 } else { 308 308 /// std::cerr << "place for ptr-to-type" << std::endl; -
src/SymTab/FixFunction.cc
r0a73148 r6b8b767 30 30 // can't delete function type because it may contain assertions, so transfer ownership to new object 31 31 ObjectDecl *pointer = new ObjectDecl( functionDecl->name, functionDecl->get_storageClasses(), functionDecl->linkage, nullptr, new PointerType( Type::Qualifiers(), functionDecl->type ), nullptr, functionDecl->attributes ); 32 pointer->location = functionDecl->location;33 32 functionDecl->attributes.clear(); 34 33 functionDecl->type = nullptr; … … 44 43 // need to recursively mutate the base type in order for multi-dimensional arrays to work. 45 44 PointerType *pointerType = new PointerType( arrayType->get_qualifiers(), arrayType->base, arrayType->dimension, arrayType->isVarLen, arrayType->isStatic ); 46 pointerType->location = arrayType->location;47 45 arrayType->base = nullptr; 48 46 arrayType->dimension = nullptr; -
src/libcfa/bits/defs.h
r0a73148 r6b8b767 28 28 29 29 #ifdef __cforall 30 #define __cfa_anonymous_object (x) inline struct x30 #define __cfa_anonymous_object 31 31 #else 32 #define __cfa_anonymous_object (x) x__cfa_anonymous_object32 #define __cfa_anonymous_object __cfa_anonymous_object 33 33 #endif 34 34 -
src/libcfa/concurrency/invoke.h
r0a73148 r6b8b767 93 93 94 94 // list of acceptable functions, null if any 95 __ cfa_anonymous_object( __small_array_t(struct __acceptable_t) );95 __small_array_t(struct __acceptable_t) __cfa_anonymous_object; 96 96 }; 97 97 … … 121 121 struct __monitor_group_t { 122 122 // currently held monitors 123 __ cfa_anonymous_object( __small_array_t(monitor_desc*) );123 __small_array_t(monitor_desc*) __cfa_anonymous_object; 124 124 125 125 // last function that acquired monitors -
src/libcfa/concurrency/monitor
r0a73148 r6b8b767 138 138 139 139 struct __acceptable_t { 140 inline struct__monitor_group_t;140 __monitor_group_t; 141 141 bool is_dtor; 142 142 }; -
src/libcfa/containers/result
r0a73148 r6b8b767 28 28 struct result { 29 29 bool has_value; 30 in line union inner_result(T, E);30 inner_result(T, E); 31 31 }; 32 32 -
src/libcfa/interpose.c
r0a73148 r6b8b767 33 33 // Interposing helpers 34 34 //============================================================================================= 35 36 void preload_libgcc(void) {37 dlopen( "libgcc_s.so.1", RTLD_NOW );38 if ( const char * error = dlerror() ) abort( "interpose_symbol : internal error pre-loading libgcc, %s\n", error );39 }40 35 41 36 typedef void (* generic_fptr_t)(void); … … 97 92 const char *version = NULL; 98 93 99 preload_libgcc();100 101 94 #pragma GCC diagnostic push 102 95 #pragma GCC diagnostic ignored "-Wdiscarded-qualifiers"
Note: See TracChangeset
for help on using the changeset viewer.