C++ section 11.8 and gcc 2.95.2 versus 3.0

Magnus Fromreide magfr@lysator.liu.se
Tue May 22 14:04:00 GMT 2001


If you try to compile the examples from section 11.8 of the C++ standard
using g++ -ansi -pedantic then the second one compiles without complaints
while the first one terminates on the third marked fault position, if that
one is removed then it comes through compilation.

gcc 2.95.2 also complained on line 9 of the first example (p->x = i;) and
terminated there so I do suppose that this is a regression from 2.95.2.

Yes, I am aware that the examples aren't normative but if the example is
wrong then we have found a bug in the standard and otherwise we have found
a bug in gcc.



More information about the Gcc mailing list