[Bug c/42174] Gcc and pointers to empty structures.

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Feb 5 20:48:00 GMT 2014


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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |mpolacek at gcc dot gnu.org
         Resolution|---                         |INVALID

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Comparing addresses of empty-sized objects is unspecified.  Closing.
(There's some discussion about that in PR57725.)

Also note that in C++ struct empty {}; isn't treated as empty, but struct S {
char a[0]; }; is.



More information about the Gcc-bugs mailing list