Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cc

    r42107b4 raf9da5f  
    1010// Created On       : Sat May 16 12:34:05 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Apr 20 22:37:20 2018
    13 // Update Count     : 1063
     12// Last Modified On : Wed May 16 09:37:17 2018
     13// Update Count     : 1070
    1414//
    1515
     
    9393
    9494        delete assert.condition;
     95        delete assert.message;
    9596}
    9697
     
    526527
    527528DeclarationNode * DeclarationNode::addQualifiers( DeclarationNode * q ) {
    528         if ( ! q ) { delete q; return this; }                           // empty qualifier
     529        if ( ! q ) { return this; }                                                     // empty qualifier
    529530
    530531        checkSpecifiers( q );
     
    560561
    561562        checkQualifiers( type, q->type );
    562         if ( (builtin == Zero || builtin == One) && error.length() == 0 ) {
     563        if ( (builtin == Zero || builtin == One) && q->type->qualifiers.val != 0 && error.length() == 0 ) {
    563564                SemanticWarning( yylloc, Warning::BadQualifiersZeroOne, Type::QualifiersNames[ilog2( q->type->qualifiers.val )], builtinTypeNames[builtin] );
    564 //              appendError( error, string( "questionable qualifiers" ) );
    565565        } // if
    566566        addQualifiersToType( q->type, type );
     
    782782DeclarationNode * DeclarationNode::addPointer( DeclarationNode * p ) {
    783783        if ( p ) {
    784                 assert( p->type->kind == TypeData::Pointer || TypeData::Reference );
     784                assert( p->type->kind == TypeData::Pointer || p->type->kind == TypeData::Reference );
    785785                setBase( p->type );
    786786                p->type = nullptr;
     
    10081008                                        obj->location = cur->location;
    10091009                                        * out++ = obj;
     1010                                        delete agg;
    10101011                                } else if ( UnionDecl * agg = dynamic_cast< UnionDecl * >( decl ) ) {
    10111012                                        UnionInstType * inst = new UnionInstType( Type::Qualifiers(), agg->get_name() );
Note: See TracChangeset for help on using the changeset viewer.