public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: gusti@pallas.dk
To: gcc-gnats@gcc.gnu.org
Cc: sq@pallas.dk
Subject: c++/7385: g++ problems with enum and __attribute__
Date: Tue, 23 Jul 2002 05:16:00 -0000	[thread overview]
Message-ID: <20020723120629.16351.qmail@sources.redhat.com> (raw)


>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(<anonymous enum>)' uses anonymous type
test.cpp:7: non-local function `void g2(<anonymous enum>)' 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:


             reply	other threads:[~2002-07-23 12:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-23  5:16 gusti [this message]
2002-09-14  5:09 nathan
2002-10-03 22:37 mmitchel
2002-11-10 11:16 Wolfgang Bangerth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020723120629.16351.qmail@sources.redhat.com \
    --to=gusti@pallas.dk \
    --cc=gcc-gnats@gcc.gnu.org \
    --cc=sq@pallas.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).