[testsuite gfortran] partial fix for secnds*.f

R. D. Flowers, Chattanooga TN USA rd@chalice.us
Tue May 29 09:43:00 GMT 2007



Rask Ingemann Lambertsen wrote:
> On Mon, May 28, 2007 at 05:14:51PM +0000, R. D. Flowers, Chattanooga TN USA wrote:
> 
>>>I think we should use parentheses to enforce the order.
>>
>>I could be missing something here, and it is almost separate statements, 
>>and might be ugly, but -- comma clauses?
>>
>>foo=term1,foo+=term2,foo+=term3 ... ;
> 
> 
> <URL:http://gcc.gnu.org/bugs.html#nonbugs_c>
> 

The link you supplied points to potential problems if there are 
inadequate sequence points in the presence of side-effects. It doesn't 
mention comma clauses, does it?

I do not see the problem when providing adequate sequence points ( what 
AFAIK is the sole purpose of comma's in a statement -- comma clauses ), 
and when the terms are constants or simple expressions (so no side-effects).

Am I missing something embarassingly obvious ( comma got removed from 
the C standard or something )?



More information about the Gcc mailing list