This is the mail archive of the 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 RFA: Clarify declares_class_or_enum in cp/parser.c

On 11 Jan 2004 19:54:16 -0500, Ian Lance Taylor <> wrote:

> This minor patch changes a comment in cp/parser.c to clarify how
> declares_class_or_enum is really used in
> cp_parser_decl_specifier_seq().  The text is mostly copied from the
> comment before cp_parser_type_specifier(), which is where
> *declares_class_or_enum is actually set.

I don't think your change to the comment actually says anything different;
an enum-specifier or class-specifier is a definition under the grammar in
the C++ standard.  I wouldn't object to a parenthetical clarification, but
I think it's appropriate for the parser to refer to specific nonterminals
from the standard grammar.

> This patch also changes the setting of *declares_class_or_enum in
> cp_parser_type_specifier() to use `0' rather than `false', since the
> value is used as an integer, not a boolean.

This hunk is OK.

> I came up with this patch while looking at the patch in PR c++/4100.
> The patch in that PR uses declares_class_or_enum in a way which did
> not match the comment in the code.  Further investigation showed me
> that the comment was wrong, and I am fairly certain that the patch is
> correct.  Somebody with authority should approve that patch, and this
> one too.

Yes, that patch looks good.  Would you mind checking it in along with


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