[Bug c/82922] Request: add -Wstrict-prototypes to -Wextra as K style is obsolescent
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82922 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #13 from Jakub Jelinek --- (In reply to Florian Weimer from comment #11) > (In reply to David Brown from comment #9) > > Could -Wstrict-prototypes be added to -Wall, or even considered enabling by > > default? The next C standard will make "void foo()" mean the same as "void > > foo(void)", like in C++, which makes the scope for confusion high. > > I think the churn from changing void foo() to void foo(void) to avoid the > warning is too high, and unnecessary for the upcoming C language change. A > more target warning could make sense, though. And even with a more targetted warning we need to be careful about configure scripts with unprototyped functions.
[Bug c/82922] Request: add -Wstrict-prototypes to -Wextra as K style is obsolescent
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82922 --- Comment #12 from Sam James --- GCC lacks an equivalent for Clang's -Wdeprecated-non-prototype, right?
[Bug c/82922] Request: add -Wstrict-prototypes to -Wextra as K style is obsolescent
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82922 --- Comment #11 from Florian Weimer --- (In reply to David Brown from comment #9) > Could -Wstrict-prototypes be added to -Wall, or even considered enabling by > default? The next C standard will make "void foo()" mean the same as "void > foo(void)", like in C++, which makes the scope for confusion high. I think the churn from changing void foo() to void foo(void) to avoid the warning is too high, and unnecessary for the upcoming C language change. A more target warning could make sense, though.
[Bug c/82922] Request: add -Wstrict-prototypes to -Wextra as K style is obsolescent
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82922 --- Comment #10 from Sam James --- (In reply to David Brown from comment #9) > Could -Wstrict-prototypes be added to -Wall, or even considered enabling by > default? The next C standard will make "void foo()" mean the same as "void > foo(void)", like in C++, which makes the scope for confusion high. Yes please, given Clang has done this (or essentially this, and added its own -Wdeprecated-non-prototype): - https://lwn.net/Articles/913505/ - https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213 - https://archives.gentoo.org/gentoo-dev/message/dd9f2d3082b8b6f8dfbccb0639e6e240 Anything which makes it easier to spot things which are going to become fatal in future is a good idea. Otherwise we'll have a headache now with Clang and a headache in a few years when defaults shift to c23.
[Bug c/82922] Request: add -Wstrict-prototypes to -Wextra as K style is obsolescent
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82922 --- Comment #9 from David Brown --- Could -Wstrict-prototypes be added to -Wall, or even considered enabling by default? The next C standard will make "void foo()" mean the same as "void foo(void)", like in C++, which makes the scope for confusion high.
[Bug c/82922] Request: add -Wstrict-prototypes to -Wextra as K style is obsolescent
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82922 --- Comment #8 from Eric Gallager --- (In reply to Martin Sebor from comment #7) > I posted a GCC 9 patch here: > https://gcc.gnu.org/ml/gcc-patches/2018-06/msg00675.html > > It adds -Wstrict-prototypes to -Wall. Unfortunately, it got derailed by > (IMO unsubstantiated) concerns about the impact on some poorly written > configure tests. I'll see if I can find the time to adjust the patch to > enable the option only with -Wextra and convince the powers that be to > accept it into GCC 9. OK, timeframe for GCC 9 has passed; what about for GCC 10?
[Bug c/82922] Request: add -Wstrict-prototypes to -Wextra as K style is obsolescent
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82922 --- Comment #7 from Martin Sebor --- I posted a GCC 9 patch here: https://gcc.gnu.org/ml/gcc-patches/2018-06/msg00675.html It adds -Wstrict-prototypes to -Wall. Unfortunately, it got derailed by (IMO unsubstantiated) concerns about the impact on some poorly written configure tests. I'll see if I can find the time to adjust the patch to enable the option only with -Wextra and convince the powers that be to accept it into GCC 9.
[Bug c/82922] Request: add -Wstrict-prototypes to -Wextra as K style is obsolescent
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82922 --- Comment #6 from Eric Gallager --- (In reply to Martin Sebor from comment #3) > Incremental patch for the testsuite: > https://gcc.gnu.org/ml/gcc-patches/2018-01/msg00962.html > > Unfortunately it sounds like it might be too late to enable the option in > GCC 8. What about for GCC 9?
[Bug c/82922] Request: add -Wstrict-prototypes to -Wextra as K style is obsolescent
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82922 Eric Gallager changed: What|Removed |Added CC||david at westcontrol dot com --- Comment #5 from Eric Gallager --- *** Bug 85676 has been marked as a duplicate of this bug. ***
[Bug c/82922] Request: add -Wstrict-prototypes to -Wextra as K style is obsolescent
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82922 --- Comment #4 from Martin Sebor --- Correction, the patch is here: https://gcc.gnu.org/ml/gcc-patches/2018-01/msg00935.html
[Bug c/82922] Request: add -Wstrict-prototypes to -Wextra as K style is obsolescent
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82922 --- Comment #3 from Martin Sebor --- Incremental patch for the testsuite: https://gcc.gnu.org/ml/gcc-patches/2018-01/msg00962.html Unfortunately it sounds like it might be too late to enable the option in GCC 8.
[Bug c/82922] Request: add -Wstrict-prototypes to -Wextra as K style is obsolescent
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82922 --- Comment #2 from ian at gcc dot gnu.org --- Author: ian Date: Wed Jan 10 15:42:23 2018 New Revision: 256437 URL: https://gcc.gnu.org/viewcvs?rev=256437=gcc=rev Log: PR c/82922 runtime, syscall: use full prototypes in C code Based on patch by Martin Sebor. Reviewed-on: https://go-review.googlesource.com/86815 Modified: trunk/gcc/go/gofrontend/MERGE trunk/libgo/go/syscall/errno.c trunk/libgo/runtime/go-now.c trunk/libgo/runtime/go-runtime-error.c trunk/libgo/runtime/proc.c trunk/libgo/runtime/runtime.h
[Bug c/82922] Request: add -Wstrict-prototypes to -Wextra as K style is obsolescent
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82922 Martin Sebor changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2018-01-04 CC||msebor at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Martin Sebor --- Confirmed.