public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Sebastian Biallas <sb@biallas.net>
To: gcc-help@gcc.gnu.org
Subject: Warnung: »packed« attribute ignored for field of type »byte«
Date: Sun, 09 Apr 2006 00:34:00 -0000	[thread overview]
Message-ID: <4438569B.1040406@biallas.net> (raw)

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

                 reply	other threads:[~2006-04-09  0:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4438569B.1040406@biallas.net \
    --to=sb@biallas.net \
    --cc=gcc-help@gcc.gnu.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).