This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/44263] missing diagnostic on questionable array sizes with -pedantic
- From: "egallager at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 26 Sep 2017 22:35:50 +0000
- Subject: [Bug c++/44263] missing diagnostic on questionable array sizes with -pedantic
- Auto-submitted: auto-generated
- References: <bug-44263-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44263
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-09-26
CC| |egallager at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #2 from Eric Gallager <egallager at gcc dot gnu.org> ---
I get a warning for g with -pedantic:
$ /usr/local/bin/g++ -c -Wall -Wextra -pedantic 44263.cc
44263.cc: In function ‘void foo()’:
44263.cc:12:39: warning: size of array is not an integral constant-expression
[-Wpedantic]
char g[(char *) &((struct S *) 0)->b - (char *) 0];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
$
But I'm assuming you're still requesting another warning for h? Confirmed in
that case.