Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    rae2f2ae rd8454b9  
    5656
    5757#include "SynTree/Attribute.h"     // for Attribute
    58 
    59 // lex uses __null in a boolean context, it's fine.
    60 #pragma GCC diagnostic ignored "-Wparentheses-equality"
    6158
    6259extern DeclarationNode * parseTree;
     
    12431240                {
    12441241                        $$ = new StatementNode( build_while( new CondCtl( nullptr, new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) ), maybe_build_compound( $4 ) ) );
    1245                         SemanticWarning( yylloc, Warning::SuperfluousElse, "" );
     1242                        SemanticWarning( yylloc, Warning::SuperfluousElse );
    12461243                }
    12471244        | WHILE '(' conditional_declaration ')' statement       %prec THEN
     
    12541251                {
    12551252                        $$ = new StatementNode( build_do_while( new ExpressionNode( build_constantInteger( *new string( "1" ) ) ), maybe_build_compound( $2 ) ) );
    1256                         SemanticWarning( yylloc, Warning::SuperfluousElse, "" );
     1253                        SemanticWarning( yylloc, Warning::SuperfluousElse );
    12571254                }
    12581255        | DO statement WHILE '(' comma_expression ')' ';'
     
    12651262                {
    12661263                        $$ = new StatementNode( build_for( new ForCtrl( (ExpressionNode * )nullptr, (ExpressionNode * )nullptr, (ExpressionNode * )nullptr ), maybe_build_compound( $4 ) ) );
    1267                         SemanticWarning( yylloc, Warning::SuperfluousElse, "" );
     1264                        SemanticWarning( yylloc, Warning::SuperfluousElse );
    12681265                }
    12691266        | FOR '(' for_control_expression_list ')' statement     %prec THEN
     
    23972394        | ENUM '(' cfa_abstract_parameter_declaration ')' attribute_list_opt '{' enumerator_list comma_opt '}'
    23982395                {
    2399                         if ( $3->storageClasses.val != 0 || $3->type->qualifiers.val != 0 )
     2396                        if ( $3->storageClasses.val != 0 || $3->type->qualifiers.val != 0 ) 
    24002397                        { SemanticError( yylloc, "storage-class and CV qualifiers are not meaningful for enumeration constants, which are const." ); }
    24012398
     
    28442841                        linkage = LinkageSpec::update( yylloc, linkage, $2 );
    28452842                }
    2846           up external_definition down
     2843          up external_definition down 
    28472844                {
    28482845                        linkage = linkageStack.top();
Note: See TracChangeset for help on using the changeset viewer.