This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH][RFC] Remove volatile from data members in libstdc++
Mike Stump wrote:
On Jul 18, 2006, at 10:37 AM, Martin Sebor wrote:
we were told by the compiler vendor
Which compiler, which vendor?
We reported it against IBM XLC++ 8.0 (PMR 02254). The code in the
test case was actually slightly different. It went something like
this:
extern int init;
for (volatile int *p = &init; *p < 1000; );
[ I'd really like to know if it was tech supporting batting the bug
away, or if an engineer thought long and hard about it, but, I'd not
expect that much visibility ]
From the support engineer's response it sounded like he was
communicating someone else's rationale for the "optimization."
They suggested either making init volatile or declaring the
pointer itself volatile (i.e., int* volatile p). The latter
doesn't really make sense to me.
Martin