[Bug c++/44263] missing diagnostic on questionable array sizes with -pedantic
egallager at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Sep 26 22:35:00 GMT 2017
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.
More information about the Gcc-bugs
mailing list