[Bug c++/69517] [5/6 regression] SEGV on a VLA with excess initializer elements

msebor at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jan 28 16:23:00 GMT 2016


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|ice-on-invalid-code         |

--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
Just to clarify: it's the program that crashes, not GCC (so removing the
ice-on-invalid-code keyword).

But I also think that rejecting or at least loudly diagnosing the code would be
preferable to letting it run off the rails.  We have tentatively agreed on this
approach in a separate thread
(https://gcc.gnu.org/ml/gcc-patches/2016-01/msg02167.html) so someone just
needs to put together a patch.  I'll see if I can find the time to do it if no
one beats me to it.

With that said, I wonder if restoring the exception that 4.9.3 would be
feasible.  It seems like the ideal solution, in line with the array new
expression.  Jason. were there problems with it that the exception throwing
code had to be removed?


More information about the Gcc-bugs mailing list