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: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Jul 2004 16:50:06 -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 pinskia at gcc dot gnu dot org 2004-07-02 16:50 -------
Not a bug, the code (with -fshort-enum) is equivent to:
#include <stdio.h>
enum E { a, b };
union Y
{
int x;
short y;
void* z;
};
int main()
{
union Y un;
un.x=1;
printf("%d\n", un.y);
}
Again this is not a bug.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16330