Changeset a983cbf for src


Ignore:
Timestamp:
Jun 17, 2023, 6:53:32 PM (14 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
c8cbb41
Parents:
b38f6da
Message:

fix bug in gcc conditional expression by cloning omitted operand

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    rb38f6da ra983cbf  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jun  7 14:32:28 2023
    13 // Update Count     : 6341
     12// Last Modified On : Sat Jun 17 18:53:24 2023
     13// Update Count     : 6347
    1414//
    1515
     
    10401040                // FIX ME: computes $1 twice
    10411041        | logical_OR_expression '?' /* empty */ ':' conditional_expression // GCC, omitted first operand
    1042                 { $$ = new ExpressionNode( build_cond( yylloc, $1, $1, $4 ) ); }
     1042                { $$ = new ExpressionNode( build_cond( yylloc, $1, $1->clone(), $4 ) ); }
    10431043        ;
    10441044
Note: See TracChangeset for help on using the changeset viewer.