This is the mail archive of the
gcc-patches@gcc.gnu.org
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, 16 Jul 2010 09:10:35 +0100
- Subject: Re: [gimple] assignments to volatile
- References: <4C1F5380.1090107@codesourcery.com> <AANLkTimzBtuWYWnzMkmDyM6Y490EIwQJxaDI_higMvJs@mail.gmail.com> <Pine.LNX.4.64.1006211517460.11284@wotan.suse.de> <4C20D40B.30904@codesourcery.com> <Pine.LNX.4.64.1006221721590.18619@wotan.suse.de> <4C20D891.5030506@codesourcery.com> <4C21E361.1040900@codesourcery.com> <4C220762.2060703@codesourcery.com> <025B27D1-E620-4BA2-A113-FD28747E2762@comcast.net> <4C22F307.6010403@codesourcery.com> <4936DDA8-4C55-4CF8-8CA7-D8B4435863BF@comcast.net> <4C236C7A.40303@codesourcery.com> <97293849-2D1F-4DE5-9B35-199E26005768@comcast.net> <4C2451CA.2020906@codesourcery.com> <E1CA7E86-EEE4-4EB7-8CAF-0FA59DD694DB@comcast.net> <4C2852F4.6070809@codesourcery.com> <CAC3E597-C092-4A46-9EEF-96589BC6794B@comcast.net> <4C319EF7.4040001@codesourcery.com> <3721950A-1FF1-441A-A22E-D19507FC36FB@comcast.net> <4C36CE16.2030200@codesourcery.com>
This discussion appears to have gone quiet. From the table in
http://gcc.gnu.org/wiki/VolatileAccessComparison I think it clear that:
* GCC's current behaviour is inconsistent
* Historically GCC's behaviour has changed. GCC 4.3's behaviour is particularly
unfortunate WRT C and C++ consistency.
* The 2 other compilers tested (I'm lumping all the EDG-based ones together)
implement different access patterns. One of which appears to be the same as the
current GCC development semantics.
* I missed another disambiguating testcase, namely '0, vobj = x;' in C the
result of the comma operator is not an lvalue -- its result has the same
properties as the result of the conditional operator. That argues for them
behaving the same -- which currently does not happen in GCC.
I think there is also consensus that what the standard literally says are not
useful semantics.
Is there consensus on what the semantics should be?
Any suggestions as to how to move forward?
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery