[Bug c++/70932] flexible array member with non-trivial destructor

msebor at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Nov 18 17:14:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70932

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW
           Assignee|msebor at gcc dot gnu.org          |unassigned at gcc dot gnu.org
      Known to fail|                            |7.2.0
           Severity|normal                      |minor

--- Comment #11 from Martin Sebor <msebor at gcc dot gnu.org> ---
(In reply to Paul Wankadia from comment #10)

There has been no change since the last comment and I'm not currently working
on it.  Since Clang rejects the test case as well I'm also not too inclined to
change GCC to accept the code.  (I do note that Intel ICC accepts it, possibly
for compatibility with GCC 5.)

To make this work I would suggest to use a zero-length array instead.  That
makes it clear that a GCC-specific extension is being used and it's also
accepted by Clang and ICC.


More information about the Gcc-bugs mailing list