Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cc

    r2e5fa345 raf9da5f  
    1010// Created On       : Sat May 16 12:34:05 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Apr 26 13:45:10 2018
    13 // Update Count     : 1064
     12// Last Modified On : Wed May 16 09:37:17 2018
     13// Update Count     : 1070
    1414//
    1515
     
    5454
    5555DeclarationNode::DeclarationNode() :
    56                 builtin( NoBuiltinType ),
    5756                type( nullptr ),
    5857                bitfieldWidth( nullptr ),
     
    102101        newnode->name = name ? new string( *name ) : nullptr;
    103102
    104         newnode->builtin = NoBuiltinType;
    105103        newnode->type = maybeClone( type );
    106104        newnode->storageClasses = storageClasses;
     
    529527
    530528DeclarationNode * DeclarationNode::addQualifiers( DeclarationNode * q ) {
    531         if ( ! q ) { delete q; return this; }                           // empty qualifier
     529        if ( ! q ) { return this; }                                                     // empty qualifier
    532530
    533531        checkSpecifiers( q );
     
    563561
    564562        checkQualifiers( type, q->type );
    565         if ( (builtin == Zero || builtin == One) && error.length() == 0 ) {
     563        if ( (builtin == Zero || builtin == One) && q->type->qualifiers.val != 0 && error.length() == 0 ) {
    566564                SemanticWarning( yylloc, Warning::BadQualifiersZeroOne, Type::QualifiersNames[ilog2( q->type->qualifiers.val )], builtinTypeNames[builtin] );
    567 //              appendError( error, string( "questionable qualifiers" ) );
    568565        } // if
    569566        addQualifiersToType( q->type, type );
Note: See TracChangeset for help on using the changeset viewer.