This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: volatile is not volatile enough


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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]