This is the mail archive of the gcc-patches@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: [PATCH,c++] provide intelligent error messages for missing semicolon after class definition


On 11/09/2010 02:30 PM, Nathan Froyd wrote:
The patch below addresses PR c++/45331 (and related PRs) by providing a
more helpful error message (in some cases) when the user forgets a
semicolon at the end of a class definition.  The basic idea is that, at
the end of the class definition, we check to see whether the next token
is in the FOLLOW set of the class definition rule.  If it is not, then
there should have been a semicolon: we complain and silently insert a
semicolon to avoid cascading errors.

Thanks very much for this!


Paolo


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