* [Bug c++/7385] g++ problems with enum and __attribute__
[not found] <20020723051601.7385.gusti@pallas.dk>
@ 2003-07-17 2:53 ` pinskia at physics dot uc dot edu
2003-07-17 7:03 ` mark at codesourcery dot com
` (7 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-17 2:53 UTC (permalink / raw)
To: gcc-bugs
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
pinskia at physics dot uc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at physics dot uc
| |dot edu
Last reconfirmed|2003-07-14 04:06:26 |2003-07-17 02:53:28
date| |
------- Additional Comments From pinskia at physics dot uc dot edu 2003-07-17 02:53 -------
Mark are you still working on a fix?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/7385] g++ problems with enum and __attribute__
[not found] <20020723051601.7385.gusti@pallas.dk>
2003-07-17 2:53 ` [Bug c++/7385] g++ problems with enum and __attribute__ pinskia at physics dot uc dot edu
@ 2003-07-17 7:03 ` mark at codesourcery dot com
2003-07-17 12:48 ` pinskia at physics dot uc dot edu
` (6 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: mark at codesourcery dot com @ 2003-07-17 7:03 UTC (permalink / raw)
To: gcc-bugs
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
------- Additional Comments From mark at codesourcery dot com 2003-07-17 07:02 -------
Subject: Re: g++ problems with enum and __attribute__
On Wed, 2003-07-16 at 19:53, pinskia at physics dot uc dot edu wrote:
> 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
>
>
> pinskia at physics dot uc dot edu changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> CC| |pinskia at physics dot uc
> | |dot edu
> Last reconfirmed|2003-07-14 04:06:26 |2003-07-17 02:53:28
> date| |
>
>
> ------- Additional Comments From pinskia at physics dot uc dot edu 2003-07-17 02:53 -------
> Mark are you still working on a fix?
No, I gave up.
It is probably relatively more tractable in the new paser, but even
there it is probably not easy. I'm not sure what the new attribute
syntax document says about this case.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/7385] g++ problems with enum and __attribute__
[not found] <20020723051601.7385.gusti@pallas.dk>
2003-07-17 2:53 ` [Bug c++/7385] g++ problems with enum and __attribute__ pinskia at physics dot uc dot edu
2003-07-17 7:03 ` mark at codesourcery dot com
@ 2003-07-17 12:48 ` pinskia at physics dot uc dot edu
2003-07-22 18:29 ` pinskia at physics dot uc dot edu
` (5 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-17 12:48 UTC (permalink / raw)
To: gcc-bugs
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
pinskia at physics dot uc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|mmitchel at gcc dot gnu dot |unassigned at gcc dot gnu
|org |dot org
Status|ASSIGNED |NEW
------- Additional Comments From pinskia at physics dot uc dot edu 2003-07-17 12:48 -------
Mark is no longer working on it.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/7385] g++ problems with enum and __attribute__
[not found] <20020723051601.7385.gusti@pallas.dk>
` (2 preceding siblings ...)
2003-07-17 12:48 ` pinskia at physics dot uc dot edu
@ 2003-07-22 18:29 ` pinskia at physics dot uc dot edu
2003-07-29 18:00 ` [Bug c++/7385] [3.3/3.4 Regression] " pinskia at physics dot uc dot edu
` (4 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-22 18:29 UTC (permalink / raw)
To: gcc-bugs
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
------- Additional Comments From pinskia at physics dot uc dot edu 2003-07-22 18:29 -------
The mainline (20030722) now gives:
pr7385.cc:3: warning: `packed' attribute ignored
pr7385.cc:4: error: non-local function `void g1(<anonymous enum>)' uses
anonymous type
pr7385.cc:6: warning: `packed' attribute ignored
pr7385.cc:7: error: non-local function `void g2(<anonymous enum>)' uses
anonymous type
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/7385] [3.3/3.4 Regression] g++ problems with enum and __attribute__
[not found] <20020723051601.7385.gusti@pallas.dk>
` (3 preceding siblings ...)
2003-07-22 18:29 ` pinskia at physics dot uc dot edu
@ 2003-07-29 18:00 ` pinskia at physics dot uc dot edu
2003-08-05 20:25 ` janis187 at us dot ibm dot com
` (3 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-29 18:00 UTC (permalink / raw)
To: gcc-bugs
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
pinskia at physics dot uc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |critical
Priority|P3 |P1
Last reconfirmed|2003-07-27 06:58:45 |2003-07-29 18:00:01
date| |
Summary|g++ problems with enum and |[3.3/3.4 Regression] g++
|__attribute__ |problems with enum and
| |__attribute__
Target Milestone|--- |3.3.2
------- Additional Comments From pinskia at physics dot uc dot edu 2003-07-29 18:00 -------
This is actually a regression from 3.0.4 so some patch made this fail.
>From Phil's regression hunter: Search converges between 2002-04-28-trunk (#75) and
2002-05-05-trunk (#76).
The only reason I say this was because Apple's 3.1 based compiler is based on 3.1
(20020420) which does not have this regression in it.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/7385] [3.3/3.4 Regression] g++ problems with enum and __attribute__
[not found] <20020723051601.7385.gusti@pallas.dk>
` (4 preceding siblings ...)
2003-07-29 18:00 ` [Bug c++/7385] [3.3/3.4 Regression] " pinskia at physics dot uc dot edu
@ 2003-08-05 20:25 ` janis187 at us dot ibm dot com
2003-08-09 2:02 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: janis187 at us dot ibm dot com @ 2003-08-05 20:25 UTC (permalink / raw)
To: gcc-bugs
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
janis187 at us dot ibm dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at redhat dot com
------- Additional Comments From janis187 at us dot ibm dot com 2003-08-05 20:25 -------
The regression in PR 7385 was introduced or exposed by this patch:
--- gcc/gcc/cp/ChangeLog ---
2002-04-30 Jason Merrill <jason@redhat.com>
* decl.c (grokdeclarator): Don't override TYPE_NAME of an
anonymous class with a typedef if there are attributes.
The regression hunt took place on i686-pc-linux-gnu using the submitter's
test case. Like many other recent hunts, it started with the dates
identified by Andrew Pinski using Phil's regression hunter.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/7385] [3.3/3.4 Regression] g++ problems with enum and __attribute__
[not found] <20020723051601.7385.gusti@pallas.dk>
` (5 preceding siblings ...)
2003-08-05 20:25 ` janis187 at us dot ibm dot com
@ 2003-08-09 2:02 ` pinskia at gcc dot gnu dot org
2003-08-29 20:40 ` jason at gcc dot gnu dot org
2003-08-29 20:48 ` jason at gcc dot gnu dot org
8 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-09 2:02 UTC (permalink / raw)
To: gcc-bugs
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
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-08-09 02:02 -------
The error message has changed again:
pr7385.cc:3: warning: `packed' attribute ignored
pr7385.cc:4: error: non-local function `void g1(e1)' uses anonymous type
pr7385.cc:3: error: `typedef enum <anonymous> e1' does not refer to the
unqualified type, so it is not used for linkage
pr7385.cc:6: warning: `packed' attribute ignored
pr7385.cc:7: error: non-local function `void g2(e2)' uses anonymous type
pr7385.cc:6: error: `typedef enum <anonymous> e2' does not refer to the
unqualified type, so it is not used for linkage
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/7385] [3.3/3.4 Regression] g++ problems with enum and __attribute__
[not found] <20020723051601.7385.gusti@pallas.dk>
` (6 preceding siblings ...)
2003-08-09 2:02 ` pinskia at gcc dot gnu dot org
@ 2003-08-29 20:40 ` jason at gcc dot gnu dot org
2003-08-29 20:48 ` jason at gcc dot gnu dot org
8 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu dot org @ 2003-08-29 20:40 UTC (permalink / raw)
To: gcc-bugs
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|NEW |ASSIGNED
Last reconfirmed|2003-08-24 17:25:54 |2003-08-29 20:40:31
date| |
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/7385] [3.3/3.4 Regression] g++ problems with enum and __attribute__
[not found] <20020723051601.7385.gusti@pallas.dk>
` (7 preceding siblings ...)
2003-08-29 20:40 ` jason at gcc dot gnu dot org
@ 2003-08-29 20:48 ` jason at gcc dot gnu dot org
8 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu dot org @ 2003-08-29 20:48 UTC (permalink / raw)
To: gcc-bugs
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 <anonymous> 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;
^ permalink raw reply [flat|nested] 9+ messages in thread