This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13983] no warning on some non-POD struct with packed attribute
- From: "mdorey at bluearc dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Mar 2006 04:31:41 -0000
- Subject: [Bug c++/13983] no warning on some non-POD struct with packed attribute
- References: <bug-13983-7764@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from mdorey at bluearc dot com 2006-03-16 04:31 -------
(In reply to comment #5)
> Nathan could you comment on this bug.
Two years with no comment. Is it because the Severity is set to Enhancement?
I'm convinced that the warning is incorrect, not missing, so I think the
Severity should be Normal and (perhaps) the Summary shouldn't say "no warning".
Perhaps another example would help to convince:
martind@duezer:~/playpen$ cat ignoring-packed.cpp
template <typename T>
struct A {
A();
} __attribute__((packed));
typedef A<int> B;
struct C {
//A<int> a;
B b;
} __attribute__((packed));
martind@duezer:~/playpen$ g++-4.0 -c ignoring-packed.cpp
ignoring-packed.cpp:10: warning: ignoring packed attribute on unpacked non-POD
field ?B C::b?
martind@duezer:~/playpen$
With gcc version 4.0.3 (Debian 4.0.3-1).
The commented-out line compiles fine, though it should be equivalent to the
following line - the one which fails to compile.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13983