This is the mail archive of the
mailing list for the GCC project.
Re: [gimple] assignments to volatile
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Mike Stump <mikestump at comcast dot net>
- Cc: Mark Mitchell <mark at codesourcery dot com>, Michael Matz <matz at suse dot de>, Richard Guenther <richard dot guenther at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 09 Jul 2010 08:21:58 +0100
- Subject: Re: [gimple] assignments to volatile
- References: <4C1F5380.email@example.com> <AANLkTimzBtuWYWnzMkmDyM6Y490EIwQJxaDI_higMvJs@mail.gmail.com> <Pine.LNX.firstname.lastname@example.org> <4C20D40B.email@example.com> <Pine.LNX.firstname.lastname@example.org> <4C20D891.email@example.com> <4C21E361.firstname.lastname@example.org> <4C220762.email@example.com> <025B27D1-E620-4BA2-A113-FD28747E2762@comcast.net> <4C22F307.firstname.lastname@example.org> <4936DDA8-4C55-4CF8-8CA7-D8B4435863BF@comcast.net> <4C236C7A.email@example.com> <97293849-2D1F-4DE5-9B35-199E26005768@comcast.net> <4C2451CA.firstname.lastname@example.org> <E1CA7E86-EEE4-4EB7-8CAF-0FA59DD694DB@comcast.net> <4C2852F4.email@example.com> <CAC3E597-C092-4A46-9EEF-96589BC6794B@comcast.net> <4C319EF7.firstname.lastname@example.org> <3721950A-1FF1-441A-A22E-D19507FC36FB@comcast.net>
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:
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 Sidwell :: http://www.codesourcery.com :: CodeSourcery