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: c++/9658: compiler accepts invalid code


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


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