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]

[Bug c++/45332] Generate clear diagnostics when a terminating semicolon is missing from a class member declaration.


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45332

--- Comment #1 from Nathan Froyd <froydnj at gcc dot gnu.org> 2010-11-06 18:42:08 UTC ---
Author: froydnj
Date: Sat Nov  6 18:41:57 2010
New Revision: 166406

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166406
Log:
gcc/cp/
    PR c++/45332
    * parser.c (cp_lexer_previous_token): New function.
    (cp_parser_member_declaration): Use previous token for error
    messages.  Assume semicolon presence rather than grovelling for
    the next one.

gcc/testsuite/
    PR c++/45332
    * g++.dg/parse/semicolon2.C: New testcase.
    * g++.dg/ext/asmspec1.C: Adjust.
    * g++.dg/init/new13.C: Adjust.
    * g++.dg/parse/ctor5.C: Adjust.


Added:
    trunk/gcc/testsuite/g++.dg/parse/semicolon2.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/ext/asmspec1.C
    trunk/gcc/testsuite/g++.dg/init/new13.C
    trunk/gcc/testsuite/g++.dg/parse/ctor5.C


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