Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cc

    rca9d65e r62c6cfa  
    1010// Created On       : Sat May 16 12:34:05 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Dec 14 19:05:17 2023
    13 // Update Count     : 1407
     12// Last Modified On : Sat Jun 17 14:41:48 2023
     13// Update Count     : 1405
    1414//
    1515
     
    632632                                        dst->basictype = src->basictype;
    633633                                } else if ( src->basictype != DeclarationNode::NoBasicType )
    634                                         SemanticError( yylloc, "multiple declaration types \"%s\" and \"%s\".",
    635                                                                    DeclarationNode::basicTypeNames[ dst->basictype ],
    636                                                                    DeclarationNode::basicTypeNames[ src->basictype ] );
     634                                        SemanticError( yylloc, string( "multiple declaration types \"" ) + DeclarationNode::basicTypeNames[ dst->basictype ] +
     635                                                                   "\" and \"" + DeclarationNode::basicTypeNames[ src->basictype ] + "\"." );
     636
    637637                                if ( dst->complextype == DeclarationNode::NoComplexType ) {
    638638                                        dst->complextype = src->complextype;
    639639                                } else if ( src->complextype != DeclarationNode::NoComplexType )
    640                                         SemanticError( yylloc, "multiple declaration types \"%s\" and \"%s\".",
    641                                                                    DeclarationNode::complexTypeNames[ src->complextype ],
    642                                                                    DeclarationNode::complexTypeNames[ src->complextype ] );
     640                                        SemanticError( yylloc, string( "multiple declaration types \"" ) + DeclarationNode::complexTypeNames[ src->complextype ] +
     641                                                                   "\" and \"" + DeclarationNode::complexTypeNames[ src->complextype ] + "\"." );
     642
    643643                                if ( dst->signedness == DeclarationNode::NoSignedness ) {
    644644                                        dst->signedness = src->signedness;
    645645                                } else if ( src->signedness != DeclarationNode::NoSignedness )
    646                                         SemanticError( yylloc, "conflicting type specifier \"%s\" and \"%s\".",
    647                                                                    DeclarationNode::signednessNames[ dst->signedness ],
    648                                                                    DeclarationNode::signednessNames[ src->signedness ] );
     646                                        SemanticError( yylloc, string( "conflicting type specifier \"" ) + DeclarationNode::signednessNames[ dst->signedness ] +
     647                                                                   "\" and \"" + DeclarationNode::signednessNames[ src->signedness ] + "\"." );
     648
    649649                                if ( dst->length == DeclarationNode::NoLength ) {
    650650                                        dst->length = src->length;
     
    652652                                        dst->length = DeclarationNode::LongLong;
    653653                                } else if ( src->length != DeclarationNode::NoLength )
    654                                         SemanticError( yylloc, "conflicting type specifier \"%s\" and \"%s\".",
    655                                                                    DeclarationNode::lengthNames[ dst->length ],
    656                                                                    DeclarationNode::lengthNames[ src->length ] );
     654                                        SemanticError( yylloc, string( "conflicting type specifier \"" ) + DeclarationNode::lengthNames[ dst->length ] +
     655                                                                   "\" and \"" + DeclarationNode::lengthNames[ src->length ] + "\"." );
    657656                        } // if
    658657                        break;
Note: See TracChangeset for help on using the changeset viewer.