This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/27945] Packed struct of variable length has wrong size
- 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: 8 Jun 2006 03:00:54 -0000
- Subject: [Bug c/27945] Packed struct of variable length has wrong size
- References: <bug-27945-12799@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-06-08 03:00 -------
> On a x86 with gcc-3.4.x/3.3.6 it prints:
> pkt 65, foo 65
> pktII 65, bar 65
> (this is the right output)
I don't get 65 with 3.4.0, I get 68 like 4.0.0 and above.
earth:~>~/ia32_linux_gcc3_4/bin/gcc -O2 t.c
earth:~>./a.out
pkt 68, foo 68
pktII 68, bar 68
earth:~>~/ia32_linux_gcc3_3/bin/gcc -O2 t.c
earth:~>./a.out
pkt 65, foo 65
pktII 65, bar 65
You should note this is extension even on top of C99 so it might be correct to
change it.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ABI
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27945