From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21335 invoked by alias); 23 Jul 2002 12:16:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 21301 invoked by uid 71); 23 Jul 2002 12:16:01 -0000 Resent-Date: 23 Jul 2002 12:16:01 -0000 Resent-Message-ID: <20020723121601.21297.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, sq@pallas.dk Resent-Reply-To: gcc-gnats@gcc.gnu.org, gusti@pallas.dk Received: (qmail 16352 invoked by uid 61); 23 Jul 2002 12:06:29 -0000 Message-Id: <20020723120629.16351.qmail@sources.redhat.com> Date: Tue, 23 Jul 2002 05:16:00 -0000 From: gusti@pallas.dk Reply-To: gusti@pallas.dk To: gcc-gnats@gcc.gnu.org Cc: sq@pallas.dk X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) X-GNATS-Notify: sq@pallas.dk Subject: c++/7385: g++ problems with enum and __attribute__ X-SW-Source: 2002-07/txt/msg00630.txt.bz2 List-Id: >Number: 7385 >Category: c++ >Synopsis: g++ problems with enum and __attribute__ >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Tue Jul 23 05:16:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Agust Karlsson >Release: 3.1 >Organization: >Environment: Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs Configured with: ../gcc-3.1/configure --prefix=/usr Thread model: single gcc version 3.1 >Description: When using g++ frontend, these erroers occure: test.cpp:4: non-local function `void g1()' uses anonymous type test.cpp:7: non-local function `void g2()' uses anonymous type But NOT if using gcc Commands used are: g++ -Wall -c test.cpp gcc -Wall -c test.c on the same code. >How-To-Repeat: // how to declare and use a packed enum ? typedef enum { v11=1, v12=2 } e1 __attribute__ ((packed)); void g1( e1 par) {} typedef enum { v21=1, v22=2} e2 __attribute__ ((packed)); void g2( e2 par) {} >Fix: >Release-Note: >Audit-Trail: >Unformatted: