public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/110848] New: Consider enabling -Wvla by default in C++ modes
@ 2023-07-28 20:02 aaron at aaronballman dot com
  2023-07-28 20:10 ` [Bug c++/110848] " pinskia at gcc dot gnu.org
                   ` (24 more replies)
  0 siblings, 25 replies; 26+ messages in thread
From: aaron at aaronballman dot com @ 2023-07-28 20:02 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110848
           Summary: Consider enabling -Wvla by default in C++ modes
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: aaron at aaronballman dot com
  Target Milestone: ---

VLAs as they're expressed in C have been considered by WG21 and rejected, are
easy to use accidentally to the surprise of users (e.g.,
https://ddanilov.me/default-non-standard-features/), and they have potential
security implications beyond constant-size arrays
(https://wiki.sei.cmu.edu/confluence/display/c/ARR32-C.+Ensure+size+arguments+for+variable+length+arrays+are+in+a+valid+range).

As a result, I've been exploring enabling this diagnostic by default in Clang
in both C++ and GNU++ modes. The in-progress patch discussion can be found at
https://reviews.llvm.org/D156565. However, we like to keep our diagnostic
behaviors in sync with GCC when possible, so I'm wondering if GCC would also
consider such a change.

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

end of thread, other threads:[~2023-10-23 11:58 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-28 20:02 [Bug c++/110848] New: Consider enabling -Wvla by default in C++ modes aaron at aaronballman dot com
2023-07-28 20:10 ` [Bug c++/110848] " pinskia at gcc dot gnu.org
2023-07-28 20:18 ` pinskia at gcc dot gnu.org
2023-07-28 20:25 ` aaron at aaronballman dot com
2023-07-28 20:35 ` pinskia at gcc dot gnu.org
2023-07-28 22:34 ` muecker at gwdg dot de
2023-07-29 11:19 ` aaron at aaronballman dot com
2023-07-31  8:18 ` [Bug c++/110848] Consider enabling -Wvla by default in non-GNU " rguenth at gcc dot gnu.org
2023-07-31 12:40 ` aaron at aaronballman dot com
2023-08-01 12:33 ` redi at gcc dot gnu.org
2023-08-01 13:01 ` aaron at aaronballman dot com
2023-08-04  5:49 ` egallager at gcc dot gnu.org
2023-08-04 12:22 ` aaron at aaronballman dot com
2023-10-21 14:45 ` aaron at aaronballman dot com
2023-10-22  4:45 ` egallager at gcc dot gnu.org
2023-10-22  4:57 ` egallager at gcc dot gnu.org
2023-10-22  9:03 ` muecker at gwdg dot de
2023-10-22 13:20 ` aaron at aaronballman dot com
2023-10-22 16:14 ` pinskia at gcc dot gnu.org
2023-10-22 16:56 ` aaron at aaronballman dot com
2023-10-22 17:45 ` muecker at gwdg dot de
2023-10-23  8:23 ` redi at gcc dot gnu.org
2023-10-23 10:30 ` muecker at gwdg dot de
2023-10-23 10:46 ` redi at gcc dot gnu.org
2023-10-23 10:50 ` redi at gcc dot gnu.org
2023-10-23 11:58 ` muecker at gwdg dot de

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).