Changeset 23a08aa0 for src/Parser


Ignore:
Timestamp:
Sep 19, 2022, 8:11:02 PM (3 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, ast-experimental, master, pthread-emulation
Children:
aa9f215
Parents:
ebf8ca5 (diff), ae1d151 (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:

fix merge conflict

Location:
src/Parser
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cc

    rebf8ca5 r23a08aa0  
    262262        newnode->type->enumeration.anon = name == nullptr;
    263263        if ( base && base->type)  {
    264                 newnode->type->base = base->type;       
     264                newnode->type->base = base->type;
    265265        } // if
    266266
     
    505505                        } // for
    506506                        // src is the new item being added and has a single bit
    507                 } else if ( ! src->storageClasses.is_threadlocal ) { // conflict ?
     507                } else if ( ! src->storageClasses.is_threadlocal_any() ) { // conflict ?
    508508                        appendError( error, string( "conflicting " ) + Type::StorageClassesNames[storageClasses.ffs()] +
    509509                                                 " & " + Type::StorageClassesNames[src->storageClasses.ffs()] );
  • src/Parser/lex.ll

    rebf8ca5 r23a08aa0  
    1010 * Created On       : Sat Sep 22 08:58:10 2001
    1111 * Last Modified By : Peter A. Buhr
    12  * Last Modified On : Sun Jun 20 18:41:09 2021
    13  * Update Count     : 759
     12 * Last Modified On : Tue Aug 30 18:39:54 2022
     13 * Update Count     : 760
    1414 */
    1515
     
    314314switch                  { KEYWORD_RETURN(SWITCH); }
    315315thread                  { KEYWORD_RETURN(THREAD); }                             // C11
    316 _Thread_local   { KEYWORD_RETURN(THREADLOCAL); }                // C11
     316__thread                { KEYWORD_RETURN(THREADLOCALGCC); }             // GCC
     317_Thread_local   { KEYWORD_RETURN(THREADLOCALC11); }             // C11
    317318throw                   { KEYWORD_RETURN(THROW); }                              // CFA
    318319throwResume             { KEYWORD_RETURN(THROWRESUME); }                // CFA
  • src/Parser/parser.yy

    rebf8ca5 r23a08aa0  
    5858
    5959// lex uses __null in a boolean context, it's fine.
    60 //#pragma GCC diagnostic ignored "-Wparentheses-equality"
     60#pragma GCC diagnostic ignored "-Wpragmas"
     61#pragma GCC diagnostic ignored "-Wparentheses-equality"
     62#pragma GCC diagnostic warning "-Wpragmas"
    6163
    6264extern DeclarationNode * parseTree;
     
    293295%token TYPEDEF
    294296%token EXTERN STATIC AUTO REGISTER
    295 %token THREADLOCAL                                                                              // C11
     297%token THREADLOCALGCC THREADLOCALC11                                            // GCC, C11
    296298%token INLINE FORTRAN                                                                   // C99, extension ISO/IEC 9899:1999 Section J.5.9(1)
    297299%token NORETURN                                                                                 // C11
     
    13451347                {
    13461348                        if ( $2 == OperKinds::LThan || $2 == OperKinds::LEThan ) { SemanticError( yylloc, MISSING_ANON_FIELD ); $$ = nullptr; }
    1347                         else { SemanticError( yylloc, MISSING_HIGH ); $$ = nullptr; } 
     1349                        else { SemanticError( yylloc, MISSING_HIGH ); $$ = nullptr; }
    13481350                }
    13491351        | comma_expression updowneq comma_expression '~' comma_expression // CFA, anonymous loop-index
     
    13571359                {
    13581360                        if ( $2 == OperKinds::LThan || $2 == OperKinds::LEThan ) { SemanticError( yylloc, MISSING_ANON_FIELD ); $$ = nullptr; }
    1359                         else { SemanticError( yylloc, MISSING_HIGH ); $$ = nullptr; } 
     1361                        else { SemanticError( yylloc, MISSING_HIGH ); $$ = nullptr; }
    13601362                }
    13611363        | comma_expression updowneq comma_expression '~' '@' // CFA, error
     
    20822084        | REGISTER
    20832085                { $$ = DeclarationNode::newStorageClass( Type::Register ); }
    2084         | THREADLOCAL                                                                           // C11
    2085                 { $$ = DeclarationNode::newStorageClass( Type::Threadlocal ); }
     2086        | THREADLOCALGCC                                                                                // GCC
     2087                { $$ = DeclarationNode::newStorageClass( Type::ThreadlocalGcc ); }
     2088        | THREADLOCALC11                                                                                // C11
     2089                { $$ = DeclarationNode::newStorageClass( Type::ThreadlocalC11 ); }
    20862090                // Put function specifiers here to simplify parsing rules, but separate them semantically.
    20872091        | INLINE                                                                                        // C99
Note: See TracChangeset for help on using the changeset viewer.