public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/37311] New: C frontend rejects __typeof__(bitfield).
@ 2008-09-01 11:15 pluto at agmk dot net
2008-09-01 12:01 ` [Bug other/37311] " joseph at codesourcery dot com
2008-09-01 12:59 ` pluto at agmk dot net
0 siblings, 2 replies; 3+ messages in thread
From: pluto at agmk dot net @ 2008-09-01 11:15 UTC (permalink / raw)
To: gcc-bugs
$ cat x.c
struct { int a:1; } bf;
__typeof__(bf.a) clone;
$ g++ -x c x.c -c
x.c:2: error: 'typeof' applied to a bit-field
this testcase was extracted from gnupg-1.4.9 sources.
it works at least on gcc-3.2.3 (Red Hat Linux 3.2.3-53).
--
Summary: C frontend rejects __typeof__(bitfield).
Product: gcc
Version: 4.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pluto at agmk dot net
GCC target triplet: *-gnu-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37311
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug other/37311] C frontend rejects __typeof__(bitfield).
2008-09-01 11:15 [Bug other/37311] New: C frontend rejects __typeof__(bitfield) pluto at agmk dot net
@ 2008-09-01 12:01 ` joseph at codesourcery dot com
2008-09-01 12:59 ` pluto at agmk dot net
1 sibling, 0 replies; 3+ messages in thread
From: joseph at codesourcery dot com @ 2008-09-01 12:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from joseph at codesourcery dot com 2008-09-01 11:59 -------
Subject: Re: New: C frontend rejects __typeof__(bitfield).
On Mon, 1 Sep 2008, pluto at agmk dot net wrote:
> $ cat x.c
> struct { int a:1; } bf;
> __typeof__(bf.a) clone;
>
> $ g++ -x c x.c -c
> x.c:2: error: 'typeof' applied to a bit-field
>
> this testcase was extracted from gnupg-1.4.9 sources.
> it works at least on gcc-3.2.3 (Red Hat Linux 3.2.3-53).
If you mean to report a C bug, use component "c"; for C++, component
"c++". For C this is a deliberate change to reject typeof on bit-fields
just as sizeof is rejected on bit-fields; see bug 10333. Your example
uses g++ and I don't know if it's a deliberate change for C++.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37311
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug other/37311] C frontend rejects __typeof__(bitfield).
2008-09-01 11:15 [Bug other/37311] New: C frontend rejects __typeof__(bitfield) pluto at agmk dot net
2008-09-01 12:01 ` [Bug other/37311] " joseph at codesourcery dot com
@ 2008-09-01 12:59 ` pluto at agmk dot net
1 sibling, 0 replies; 3+ messages in thread
From: pluto at agmk dot net @ 2008-09-01 12:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pluto at agmk dot net 2008-09-01 12:58 -------
(In reply to comment #1)
> Subject: Re: New: C frontend rejects __typeof__(bitfield).
>
> On Mon, 1 Sep 2008, pluto at agmk dot net wrote:
>
> > $ cat x.c
> > struct { int a:1; } bf;
> > __typeof__(bf.a) clone;
> >
> > $ g++ -x c x.c -c
> > x.c:2: error: 'typeof' applied to a bit-field
> >
> > this testcase was extracted from gnupg-1.4.9 sources.
> > it works at least on gcc-3.2.3 (Red Hat Linux 3.2.3-53).
>
> If you mean to report a C bug, use component "c"; for C++, component
> "c++". For C this is a deliberate change to reject typeof on bit-fields
> just as sizeof is rejected on bit-fields; see bug 10333.
ok, i found the right solution:
http://lists.gnupg.org/pipermail/gnupg-devel/2008-April/024344.html
> Your example uses g++ and I don't know if it's a deliberate change for C++.
i used the 'g++ -x c' which means C.
--
pluto at agmk dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |WONTFIX
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37311
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-09-01 12:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-01 11:15 [Bug other/37311] New: C frontend rejects __typeof__(bitfield) pluto at agmk dot net
2008-09-01 12:01 ` [Bug other/37311] " joseph at codesourcery dot com
2008-09-01 12:59 ` pluto at agmk dot net
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).