Changeset ae2f2ae


Ignore:
Timestamp:
Jun 22, 2022, 12:59:43 PM (3 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
master, pthread-emulation, qualifiedEnum
Children:
1158180
Parents:
c19edd1
Message:

Removed and ignored some warnings in Parser.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    rc19edd1 rae2f2ae  
    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"
    5861
    5962extern DeclarationNode * parseTree;
     
    12401243                {
    12411244                        $$ = new StatementNode( build_while( new CondCtl( nullptr, new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) ), maybe_build_compound( $4 ) ) );
    1242                         SemanticWarning( yylloc, Warning::SuperfluousElse );
     1245                        SemanticWarning( yylloc, Warning::SuperfluousElse, "" );
    12431246                }
    12441247        | WHILE '(' conditional_declaration ')' statement       %prec THEN
     
    12511254                {
    12521255                        $$ = new StatementNode( build_do_while( new ExpressionNode( build_constantInteger( *new string( "1" ) ) ), maybe_build_compound( $2 ) ) );
    1253                         SemanticWarning( yylloc, Warning::SuperfluousElse );
     1256                        SemanticWarning( yylloc, Warning::SuperfluousElse, "" );
    12541257                }
    12551258        | DO statement WHILE '(' comma_expression ')' ';'
     
    12621265                {
    12631266                        $$ = new StatementNode( build_for( new ForCtrl( (ExpressionNode * )nullptr, (ExpressionNode * )nullptr, (ExpressionNode * )nullptr ), maybe_build_compound( $4 ) ) );
    1264                         SemanticWarning( yylloc, Warning::SuperfluousElse );
     1267                        SemanticWarning( yylloc, Warning::SuperfluousElse, "" );
    12651268                }
    12661269        | FOR '(' for_control_expression_list ')' statement     %prec THEN
     
    23942397        | ENUM '(' cfa_abstract_parameter_declaration ')' attribute_list_opt '{' enumerator_list comma_opt '}'
    23952398                {
    2396                         if ( $3->storageClasses.val != 0 || $3->type->qualifiers.val != 0 ) 
     2399                        if ( $3->storageClasses.val != 0 || $3->type->qualifiers.val != 0 )
    23972400                        { SemanticError( yylloc, "storage-class and CV qualifiers are not meaningful for enumeration constants, which are const." ); }
    23982401
     
    28412844                        linkage = LinkageSpec::update( yylloc, linkage, $2 );
    28422845                }
    2843           up external_definition down 
     2846          up external_definition down
    28442847                {
    28452848                        linkage = linkageStack.top();
Note: See TracChangeset for help on using the changeset viewer.