This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: volatile is not volatile enough
- From: Andreas Schwab <schwab at suse dot de>
- To: Hirogen2 <hirogen2 at gmx dot de>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 25 Jun 2003 16:03:27 +0200
- Subject: Re: volatile is not volatile enough
- References: <Pine.LNX.4.53.0306251515330.27252@yvahk01.tjqt.qr>
Jan Engelhardt <jengelh@linux01.gwdg.de> writes:
|> Hi,
|>
|> given a statement like
|> int a[2];
|> func2(func1(a), a[0], a[1]);
|> where a is modified by func1, func2 receives wrong input on the stack.
Not a bug. Evaluation order of function arguments is unspecified,
volatile does not change that fact.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."