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 Tue, Nov 16, 2010 at 06:39:20PM -0800, Mark Mitchell wrote:
> On 11/9/2010 5:30 AM, Nathan Froyd wrote:
> > +      case CPP_NAME:
> > +      case CPP_SEMICOLON:
> > +      case CPP_MULT:
> > +      case CPP_AND:
> > +      case CPP_OPEN_PAREN:
> > +      case CPP_CLOSE_PAREN:
> > +      case CPP_COMMA:
> > +        want_semicolon = false;
> > +        break;
> > +        /* While it's legal for type qualifiers and storage class
> 
> Usual GNU style is a blank line after the "break", especially before a
> big comment.  Also, I'm a little worried that we'll add something
> somewhere and forget to update this list, or the list of
> 
> > +	  case RID_CONST:
> > +	  case RID_VOLATILE:
> 
> specifiers and types (RID_INT, etc).  Would you please factor into a
> predicate function?

I think it would be reasonable to provide functions for the RID_*
constants (keyword_is_{storage_class,type}_specifier, perhaps); such
lists occur all over the place.  But I'm not sure it's worthwhile for
the CPP_* constants in this case.  A function
cpp_token_in_follow_set_for_class_specifier doesn't seem like it'd be
reusable.  WDYT?

-Nathan


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