This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Volatile MEMs in statement expressions and functions inlined astrees
- From: Gabriel Dos Reis <gdr at codesourcery dot com>
- To: Paul Schlie <schlie at mediaone dot net>
- Cc: Jason Merrill <jason at redhat dot com>, Linus Torvalds <torvalds at transmeta dot com>, Alexandre Oliva <aoliva at redhat dot com>, Richard Henderson <rth at redhat dot com>, <gdr at codesourcery dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: 18 Dec 2001 03:21:30 +0100
- Subject: Re: Volatile MEMs in statement expressions and functions inlined astrees
- Organization: CodeSourcery, LLC
- References: <B8427EC7.3A61%schlie@mediaone.net>
Paul Schlie <schlie@mediaone.net> writes:
| >> It it being asserted that:
| >
| >> volatile q
| >> (q = 10) == 10
| >
| >> is ambiguous, and therefore defined?
| >
| > I am asserting that in C++ the above is unambiguously equivalent to
| >
| > q = 10, q == 10
| >
| > and therefore the result of the comparison cannot be predicted.
| >
| > Jason
|
| Hence you are asserting that "(q = 10) == 10" may not be true, if q is
| volatile. Correct?
Yes, that is the whole point of this thread :-)
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com