public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/70075] incorrect initialization of multidimensional VLAs
       [not found] <bug-70075-4@http.gcc.gnu.org/bugzilla/>
@ 2020-07-01  0:23 ` msebor at gcc dot gnu.org
  2020-11-03  5:26 ` egallager at gcc dot gnu.org
  1 sibling, 0 replies; 2+ messages in thread
From: msebor at gcc dot gnu.org @ 2020-07-01  0:23 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |chengcongxiu at huawei dot com

--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
*** Bug 95993 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/70075] incorrect initialization of multidimensional VLAs
       [not found] <bug-70075-4@http.gcc.gnu.org/bugzilla/>
  2020-07-01  0:23 ` [Bug c++/70075] incorrect initialization of multidimensional VLAs msebor at gcc dot gnu.org
@ 2020-11-03  5:26 ` egallager at gcc dot gnu.org
  1 sibling, 0 replies; 2+ messages in thread
From: egallager at gcc dot gnu.org @ 2020-11-03  5:26 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |egallager at gcc dot gnu.org

--- Comment #5 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Eric Gallager from comment #3)
> (In reply to Eric Gallager from comment #2)
> > 
> > I get this output on i386-apple-darwin9.8.0 with gcc8:
> > 
> > $ /usr/local/bin/g++ -Wall -Wextra -Wpedantic -o 70075.exe 70075.cc
> > 70075.cc: In function ‘void bar(int)’:
> > 70075.cc:4:13: warning: ISO C++ forbids variable length array ‘a’ [-Wvla]
> >   char a[m][n] = { { 0, 1, 2 } };
> >              ^
> > $ ./70075.exe
> > 0 1 2 0 0 0 -32 -113 
> > $
> > 
> > (i.e. no errors)
> 
> Running the program on x86_64-apple-darwin10.8.0 with gcc9, it prints this
> instead:
> 0 1 2 0 9 0 0 0
> (still no errors though)

Update for gcc 11 on x86_64-apple-darwin19.6.0:
0 1 2 0 0 0 0 0
So, not only are there no errors now, but it also looks like everything after
the "0 1 2" is now properly zero-initialized? FIXED?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-03  5:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-70075-4@http.gcc.gnu.org/bugzilla/>
2020-07-01  0:23 ` [Bug c++/70075] incorrect initialization of multidimensional VLAs msebor at gcc dot gnu.org
2020-11-03  5:26 ` egallager at gcc dot gnu.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).