public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/101117] New: Does not diagnose invalid constant initializers with -std=c11 -pedantic -pedantic-errors
@ 2021-06-18 6:22 rguenth at gcc dot gnu.org
0 siblings, 0 replies; only message in thread
From: rguenth at gcc dot gnu.org @ 2021-06-18 6:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101117
Bug ID: 101117
Summary: Does not diagnose invalid constant initializers with
-std=c11 -pedantic -pedantic-errors
Product: gcc
Version: 11.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: rguenth at gcc dot gnu.org
Target Milestone: ---
const int i = 0;
static int j = i;
is not diagnosed with any option I tried - I am aware that the C standard
allows compilers to accept other forms of constant expressions but this
makes writing portable code hard. The above is for example rejected with
GCC 7 but accepted with GCC 8 and on and there's no way to get such
code diagnosed that might not be accepted by other compilers.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-18 6:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-18 6:22 [Bug c/101117] New: Does not diagnose invalid constant initializers with -std=c11 -pedantic -pedantic-errors rguenth 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).