From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12833 invoked by alias); 15 Feb 2011 16:17:03 -0000 Received: (qmail 12753 invoked by uid 22791); 15 Feb 2011 16:16:57 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 15 Feb 2011 16:16:54 +0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/47704] [4.6 regression] [C++0x] Java-related error message when trying to instantiate a strongly typed enum with new X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Tue, 15 Feb 2011 16:22:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-02/txt/msg01828.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47704 --- Comment #4 from Jakub Jelinek 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 {