[gimple] assignments to volatile

Nathan Sidwell nathan@codesourcery.com
Fri Jul 9 07:22:00 GMT 2010


On 07/09/10 06:27, Mike Stump wrote:
> On Jul 5, 2010, at 1:59 AM, Nathan Sidwell wrote:
>> Do you have a reference to the C standard that clarifies the difference?
>
> Sure, it would be the part where the edits are when we ask them to regularize the rules with C++ after C++ fixes what they broke.  :-)  That is why I carefully chose the phrase `what we should do' as opposed to, what the standard says...
>
>> Wrt the std, all those expression-statements have values - the first is an lvalue, the other 2 are rvalues.
>
> Yeah, I know.
>
>> Another example I missed is:
>>   expr, vobj;
>>
>> I think that should read vobj.
>
> :-)  gcc fetches.  I'd not oppose that.
>
>> But AFAICT 'expr, vobj = data;' and 'expr, vobj;' are identically rvalued according to the C std.  Is there anything in the std that justifies them behaving differently?
>
> Nope, don't think so, at least in the C standard.

Good, so I think we're all agreed that what the C standard says is not the 
behaviour we want.

nathan

-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::         CodeSourcery



More information about the Gcc-patches mailing list