Changes in / [0a73148:6b8b767]


Ignore:
Location:
src
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • src/Common/SemanticError.h

    r0a73148 r6b8b767  
    5656        {"reference-conversion"   , "rvalue to reference conversion of rvalue: %s" , Severity::Warn},
    5757        {"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},
    5958};
    6059
     
    6362        RvalueToReferenceConversion,
    6463        BadQualifiersZeroOne,
    65         AggrForwardDecl,
    6664        NUMBER_OF_WARNINGS, //This MUST be the last warning
    6765};
  • src/Parser/DeclarationNode.cc

    r0a73148 r6b8b767  
    10031003                                // };
    10041004                                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 type
    1024                                                                                 SemanticWarning( cur->location, Warning::AggrForwardDecl, aggr->name.c_str() );
    1025                                                                         }
    1026                                                                 }
    1027                                                         }
    1028                                                 }
    1029                                         }
    10301005                                        decl->location = cur->location;
    10311006                                        * out++ = decl;
  • src/Parser/TypedefTable.cc

    r0a73148 r6b8b767  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // TypedefTable.cc --
     7// TypedefTable.cc -- 
    88//
    99// Author           : Peter A. Buhr
    1010// Created On       : Sat May 16 15:20:13 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jul 13 18:35:54 2018
    13 // Update Count     : 257
     12// Last Modified On : Thu Jul 12 16:16:24 2018
     13// Update Count     : 256
    1414//
    1515
  • src/Parser/parser.yy

    r0a73148 r6b8b767  
    23072307                { $$ = new ExpressionNode( new TypeExpr( maybeMoveBuildType( $1 ) ) ); }
    23082308        | assignment_expression
    2309                 { SemanticError( yylloc, toString("Expression generic parameters are currently unimplemented: ", $1->build()) ); $$ = nullptr; }
    23102309        | type_list ',' type
    23112310                { $$ = (ExpressionNode *)( $1->set_last( new ExpressionNode( new TypeExpr( maybeMoveBuildType( $3 ) ) ) ) ); }
    23122311        | 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 )); }
    23152313        ;
    23162314
  • src/ResolvExpr/AlternativeFinder.cc

    r0a73148 r6b8b767  
    482482        template< typename ForwardIterator, typename OutputIterator >
    483483        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 end
    485484                if ( begin == end ) {
    486485                        if ( newNeed.empty() ) {
     
    11861185                                std::cerr << "bindings are:" << std::endl;
    11871186                                withFunc.env.print( std::cerr, 8 );
    1188                                 std::cerr << "cost is: " << withFunc.cost << std::endl;
    11891187                                std::cerr << "cost of conversion is:" << cvtCost << std::endl;
    11901188                        )
  • src/ResolvExpr/CommonType.cc

    r0a73148 r6b8b767  
    267267                                                result = otherPointer->clone();
    268268                                        } // if
    269                                         strict_dynamic_cast<PointerType*>(result)->base->get_qualifiers() = tq1 | tq2;
     269                                        result->get_qualifiers() = tq1 | tq2;
    270270                                } else {
    271271                                        /// std::cerr << "place for ptr-to-type" << std::endl;
     
    304304                                                result = otherRef->clone();
    305305                                        } // if
    306                                         strict_dynamic_cast<ReferenceType*>(result)->base->get_qualifiers() = tq1 | tq2;
     306                                        result->get_qualifiers() = tq1 | tq2;
    307307                                } else {
    308308                                        /// std::cerr << "place for ptr-to-type" << std::endl;
  • src/SymTab/FixFunction.cc

    r0a73148 r6b8b767  
    3030                // can't delete function type because it may contain assertions, so transfer ownership to new object
    3131                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;
    3332                functionDecl->attributes.clear();
    3433                functionDecl->type = nullptr;
     
    4443                // need to recursively mutate the base type in order for multi-dimensional arrays to work.
    4544                PointerType *pointerType = new PointerType( arrayType->get_qualifiers(), arrayType->base, arrayType->dimension, arrayType->isVarLen, arrayType->isStatic );
    46                 pointerType->location = arrayType->location;
    4745                arrayType->base = nullptr;
    4846                arrayType->dimension = nullptr;
  • src/libcfa/bits/defs.h

    r0a73148 r6b8b767  
    2828
    2929#ifdef __cforall
    30 #define __cfa_anonymous_object(x) inline struct x
     30#define __cfa_anonymous_object
    3131#else
    32 #define __cfa_anonymous_object(x) x __cfa_anonymous_object
     32#define __cfa_anonymous_object __cfa_anonymous_object
    3333#endif
    3434
  • src/libcfa/concurrency/invoke.h

    r0a73148 r6b8b767  
    9393
    9494                // 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;
    9696        };
    9797
     
    121121        struct __monitor_group_t {
    122122                // currently held monitors
    123                 __cfa_anonymous_object( __small_array_t(monitor_desc*) );
     123                __small_array_t(monitor_desc*) __cfa_anonymous_object;
    124124
    125125                // last function that acquired monitors
  • src/libcfa/concurrency/monitor

    r0a73148 r6b8b767  
    138138
    139139struct __acceptable_t {
    140         inline struct __monitor_group_t;
     140        __monitor_group_t;
    141141        bool is_dtor;
    142142};
  • src/libcfa/containers/result

    r0a73148 r6b8b767  
    2828struct result {
    2929        bool has_value;
    30         inline union inner_result(T, E);
     30        inner_result(T, E);
    3131};
    3232
  • src/libcfa/interpose.c

    r0a73148 r6b8b767  
    3333// Interposing helpers
    3434//=============================================================================================
    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 }
    4035
    4136typedef void (* generic_fptr_t)(void);
     
    9792                const char *version = NULL;
    9893
    99                 preload_libgcc();
    100 
    10194#pragma GCC diagnostic push
    10295#pragma GCC diagnostic ignored "-Wdiscarded-qualifiers"
Note: See TracChangeset for help on using the changeset viewer.