public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Warnung: »packed« attribute ignored for field of type »byte«
@ 2006-04-09  0:34 Sebastian Biallas
  0 siblings, 0 replies; only message in thread
From: Sebastian Biallas @ 2006-04-09  0:34 UTC (permalink / raw)
  To: gcc-help

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello!

I'm using "__attribute__((packed))" for the elements of a struct so that
gcc doesn't add padding. The structs are somehow machine generated, so
all elements have this. When using gcc-4.1.0 with -Wall I get a lot of

Warning: »packed« attribute ignored for field of type »byte«

What exactly is the reason of this warning? It just clobbers gcc output
and has no real helpful meaning. So, maybe gcc always puts bytes on an
unaligned address and the "packed"-attribute is superfluous, but: I
don't care and maybe other compilers have a different opinion about that..

Am I missing something? What is this warning good for except making code
generation harder?

Sebastian


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEVAwUBRDhWm/81M8QtvOSJAQJQOAgAhYIvsQipGyESaEA1bhKJHIDPv+dmn0mQ
44vstpW8sQr6NkzXkIQm75I321D/bNwvYkv7R4Q53X+1/dvCSbObkxr4Y4mLIWDI
aX40tT1OxSLApzCYjJR+f0QFoKWX/67tGPHBzfkTZBNGgTLVyVjgWi/wXUGTaDir
IS9m9O6Ik5NoKfvRJFklWcpVXISAI69XqCO52ez1CTqvuIAiTB69P3kcAq5lDShZ
a5Hxck04bHObr6W/mJlcDNcDE3NtD0p0TIU5YpjUbM95dDEnw3/2UGXVHOMDjweG
4wbCEvm6Npu9RX1sa/Sfu2Os67MjsB8GqZGIfEdP/N++XDrlRMtUnA==
=uHA0
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-04-09  0:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-09  0:34 Warnung: »packed« attribute ignored for field of type »byte« Sebastian Biallas

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).