c++/9658: compiler accepts invalid code
bangerth@dealii.org
bangerth@dealii.org
Fri Feb 14 20:58:00 GMT 2003
Synopsis: compiler accepts invalid code
State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Fri Feb 14 20:58:12 2003
State-Changed-Why:
That's a gcc extension. If you use -ansi -pedantic, you'll get
tmp/g> /home/bangerth/bin/gcc-3.2.2-pre/bin/c++ -ansi -pedantic -c x.cc
x.cc: In function `int main()':
x.cc:2: warning: ISO C++ forbids array dimensions with parenthesized type in
new
The new parser in 3.4 rejects it outright (i.e. the extension
has been removed):
tmp/g> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc
x.cc: In function `int main()':
x.cc:2: error: expected `,' or `;'
Wolfgang
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9658
More information about the Gcc-bugs
mailing list