This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/16330] Unions handled incorrectly with -fshort-enums
- From: "miko at stacken dot kth dot se" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Jul 2004 17:02:39 -0000
- Subject: [Bug c/16330] Unions handled incorrectly with -fshort-enums
- References: <20040702163848.16330.miko@stacken.kth.se>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From miko at stacken dot kth dot se 2004-07-02 17:02 -------
You're going to have to explain this one to me.
1) It works as expected on other platforms
2) If I use char or short, I get 0 in both cases. At least this is consistent,
even though it's surely wrong? But by using an enum, which under -fshort-enums
should be resolved to a char, not a short (single byte is the smallest that can
contain all of the values, and is how large gcc allocates in a struct) it
produces two different values???
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16330