public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/17519] New: Warning for array of packed non-POD in packed struct
@ 2004-09-16 12:10 timb at bluearc dot com
  2004-09-23  1:41 ` [Bug c++/17519] [3.4/4.0 Regression] " pinskia at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: timb at bluearc dot com @ 2004-09-16 12:10 UTC (permalink / raw)
  To: gcc-bugs

Compiling this with -Wall:
-----
struct A {
  A();
} __attribute__((packed));

struct B {
  A a[2];
} __attribute__((packed));
-----

gives:
test.cpp:6: warning: ignoring packed attribute on unpacked non-POD field `A B::a[2]'

A non-array packed non-POD member does not produce this warning. There is also
no warning if the packed attribute is removed from B and added to the array
declaration inside, even though declaring it on a struct is meant to be
equivalent to declaring it on each member.

May be related to bug 13983.

-- 
           Summary: Warning for array of packed non-POD in packed struct
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: timb at bluearc dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i486-linux
  GCC host triplet: i486-linux
GCC target triplet: i486-linux


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


^ permalink raw reply	[flat|nested] 12+ messages in thread
[parent not found: <bug-17519-3259@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2005-10-30 22:55 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-16 12:10 [Bug c++/17519] New: Warning for array of packed non-POD in packed struct timb at bluearc dot com
2004-09-23  1:41 ` [Bug c++/17519] [3.4/4.0 Regression] " pinskia at gcc dot gnu dot org
2004-11-01  0:46 ` mmitchel at gcc dot gnu dot org
2005-01-27  0:34 ` pinskia at gcc dot gnu dot org
2005-01-27 17:51 ` timb at bluearc dot com
2005-02-14 15:51 ` nathan at gcc dot gnu dot org
2005-02-28 23:05 ` [Bug c++/17519] [3.4/4.0/4.1 " timb at bluearc dot com
2005-05-19 17:49 ` mmitchel at gcc dot gnu dot org
2005-07-22 21:18 ` pinskia at gcc dot gnu dot org
2005-09-27 16:21 ` mmitchel at gcc dot gnu dot org
     [not found] <bug-17519-3259@http.gcc.gnu.org/bugzilla/>
2005-10-23 19:54 ` pinskia at gcc dot gnu dot org
2005-10-30 22:55 ` mmitchel at gcc dot gnu dot org

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