From: Jim Blandy <jimb@redhat.com>
To: Michael Elizabeth Chastain <mec@shout.net>
Cc: ac131313@redhat.com, drow@mvista.com, ezannoni@redhat.com,
gdb-patches@sources.redhat.com, msnyder@redhat.com
Subject: Re: [rfa] save space by using enum bitfields
Date: Tue, 19 Aug 2003 21:57:00 -0000 [thread overview]
Message-ID: <vt2zni5ux6y.fsf@zenia.home> (raw)
In-Reply-To: <200308191938.h7JJcED0023548@duracef.shout.net>
Michael Elizabeth Chastain <mec@shout.net> writes:
> Rats, I found a bug in my patch. Too bad you didn't approve it
> before I found the bug. :)
>
> The bug is that the old code has some of this:
>
> struct minimal_symbol
> {
> ...
> enum minimal_symbol_type { ... } type BYTE_BITFIELD;
> ...
> };
>
> My patch has this:
>
> struct minimal_symbol
> {
> ...
> enum minimal_symbol_type { ... };
> BITFIELD_ENUM(minimal_symbol_type) type : 8
> ...
> };
>
> gcc 3.3.1 emits warnings for the declaration of enum inside struct.
> And gcc 3.2-7-rh emits errors for this!
I did notice that, actually, and went looking through the ISO C spec
to see whether it was kosher. ISO C says that there are only four
kinds of scope: function, block, file, and prototype. So those enums
should have file scope, which is what you want.
But if GCC doesn't like it, okay. *shrug*
next prev parent reply other threads:[~2003-08-19 21:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-19 19:38 Michael Elizabeth Chastain
2003-08-19 21:57 ` Jim Blandy [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-08-19 19:42 Michael Elizabeth Chastain
2003-08-18 22:35 Michael Elizabeth Chastain
2003-08-19 19:25 ` Jim Blandy
2003-08-18 22:07 Michael Elizabeth Chastain
2003-08-18 23:02 ` Andrew Cagney
2003-08-18 7:00 Michael Elizabeth Chastain
2003-08-18 20:50 ` Michael Snyder
2003-08-18 20:56 ` Daniel Jacobowitz
2003-08-18 21:47 ` Jim Blandy
2003-08-18 21:50 ` David Carlton
2003-08-18 21:53 ` Daniel Jacobowitz
2003-08-18 21:06 ` David Carlton
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=vt2zni5ux6y.fsf@zenia.home \
--to=jimb@redhat.com \
--cc=ac131313@redhat.com \
--cc=drow@mvista.com \
--cc=ezannoni@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=mec@shout.net \
--cc=msnyder@redhat.com \
/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