This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/37200] duplicate warning message with braced initializer list
- 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, 25 Jul 2017 00:41:15 +0000
- Subject: [Bug c/37200] duplicate warning message with braced initializer list
- Auto-submitted: auto-generated
- References: <bug-37200-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37200
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-07-25
CC| |egallager at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #2 from Eric Gallager <egallager at gcc dot gnu.org> ---
Confirmed that gcc still prints 2 warnings for the testcase. It's necessary to
set the standard manually to c89 or gnu89 now that GCC defaults to -std=gnu11.
Now that GCC has carets for its diagnostics, we can see that the 2 warnings
actually point to different places:
$ /usr/local/bin/gcc -c -std=gnu89 -pedantic 37200.c
37200.c: In function ‘foo’:
37200.c:10:11: warning: initializer element is not computable at load time
[-Wpedantic]
{ (void**) &x->tst }
^
37200.c:10:3: warning: initializer element is not computable at load time
[-Wpedantic]
{ (void**) &x->tst }
^
So are they still actually duplicates?