public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/52981] New: Separate -Wpacked into two options
@ 2012-04-13 18:31 akurland at digi dot com
  2012-10-24 15:22 ` [Bug c/52981] " akurland at digi dot com
  2015-04-24  1:55 ` [Bug c/52981] Separate -Wpadded " david at doublewise dot net
  0 siblings, 2 replies; 3+ messages in thread
From: akurland at digi dot com @ 2012-04-13 18:31 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52981

             Bug #: 52981
           Summary: Separate -Wpacked into two options
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: akurland@digi.com


The option -Wpacked reports two different warnings:

1. warning: padding struct to align ‘<member name>’
2. warning: padding struct size to alignment boundary

The first warning indicates that the structure can be reordered in such a way
as to reduce padding. The second warning simply indicates that the structure is
not a multiple of the largest primitive data type and required padding at the
end.

I find the first warning much more interesting than the second one.
Specifically I would like to control them individually using -Werror.

If we can add something like -Wpacked-align and -Wpacked-size as additional
options (while still preserving the behavior of -Wpacked) I think this would be
a valuable addition to GCC.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-24  1:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-13 18:31 [Bug c/52981] New: Separate -Wpacked into two options akurland at digi dot com
2012-10-24 15:22 ` [Bug c/52981] " akurland at digi dot com
2015-04-24  1:55 ` [Bug c/52981] Separate -Wpadded " david at doublewise dot net

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