From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30380 invoked by alias); 29 Aug 2003 20:48:27 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 30361 invoked by uid 48); 29 Aug 2003 20:48:27 -0000 Date: Fri, 29 Aug 2003 20:48:00 -0000 Message-ID: <20030829204827.30359.qmail@sources.redhat.com> From: "jason at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20020723051601.7385.gusti@pallas.dk> References: <20020723051601.7385.gusti@pallas.dk> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/7385] [3.3/3.4 Regression] g++ problems with enum and __attribute__ X-Bugzilla-Reason: CC X-SW-Source: 2003-08/txt/msg03277.txt.bz2 List-Id: PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7385 jason at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |INVALID ------- Additional Comments From jason at gcc dot gnu dot org 2003-08-29 20:48 ------- This observed behavior was the intent of the patch. The gcc trunk gives this additional error for your testcase: error: `typedef enum e1' does not refer to the unqualified type, so it is not used for linkage You want to write enum e1 { v11=1, v12=2 } __attribute__ ((packed)); instead, so that the attribute applies to the enum rather than the typedef. If you want to use "e1" without "enum" in C, you can then write typedef enum e1 e1;