[C++] Ping: patch c++/15049
Nathan Sidwell
nathan@codesourcery.com
Mon Sep 20 18:29:00 GMT 2004
Matt Austern wrote:
> This turned into a discussion of our policy with respect to C++ standard
> evolution. I just wanted to make sure the patch itself didn't get lost
> in the shuffle. It's small and safe, but I think it's pretty important:
> c++/15049 breaks SPEC2004, QT, and probably some other programs we care
> about.
thanks, I was confused because your description says
>> Previous compilers accepted the construct "enum { x = 3 } x;", but
whereas it's become clear you are talking about enum { anything_but_x = 3 } x;
could you recode this bit,
>> ! if (DECL_EXTERN_C_P (decl)
>> ! /* Allow this; it's pretty common in C. */
>> ! || same_type_ignoring_top_level_qualifiers_p(t1, t))
>> ! /* Allow anonymous types; see above. */
>> ! ;
>> else
>> {
>> + /* It's a typedef referring to an anonymous type. */
as something more like
if (decl_extern)
/*allow this, it's c ...*/;
else if (same_type_ignoring...)
/* Big long description you had in the outer comment. */;
else
{ /* it's a typedef ...*/
and lose the big long description from the outer comment?
ok with that change, thanks.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
More information about the Gcc-patches
mailing list