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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-02-15 
16:16:34 UTC ---
Created attachment 23354
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23354
gcc46-pr47704-2.patch

Or alternatively we could use TYPE_LANG_FLAG_5 here (as TYPE_LANG_FLAG_5 so far
is only used for CLASS_TYPE_P, but only on RECORD_TYPE and UNION_TYPE codes and
CLASS_TYPE_P macro checks that first).  Therefore using it for ENUMERAL_TYPE
should be fine.

BTW, unrelated to this, I wonder if we don't need to copy over that bit
in pt.c, something like:
--- pt.c 2011-02-15 15:42:18.000000000 +0100
+++ pt.c 2011-02-15 17:14:26.212139615 +0100
@@ -6993,6 +6993,8 @@ lookup_template_class (tree d1,
               SET_SCOPED_ENUM_P (t, SCOPED_ENUM_P (template_type));
             }
           SET_OPAQUE_ENUM_P (t, OPAQUE_ENUM_P (template_type));
+          ENUM_FIXED_UNDERLYING_TYPE_P (t)
+            = ENUM_FIXED_UNDERLYING_TYPE_P (template_type);
         }
       else
         {

Reply via email to