This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH/RFC] enable -Wstrict-prototypes (PR 82922)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Martin Sebor <msebor at gmail dot com>
- Cc: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 11 Jan 2018 20:10:55 +0100
- Subject: Re: [PATCH/RFC] enable -Wstrict-prototypes (PR 82922)
- Authentication-results: sourceware.org; auth=none
- References: <fd0e8802-a5ae-d474-ab3b-da4691ba104d@gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Jan 11, 2018 at 11:41:19AM -0700, Martin Sebor wrote:
> Declaring a function without a prototype has been deprecated
> for nearly two decades (since C99) and may be removed from
> the C language in C2X. To prompt programs to transition to
> the more modern and safer style, PR 82922 requests to enable
> Wstrict-prototypes in -Wextra.
Does it really warn for
int
main ()
{
...
}
? main isn't called from C code, there is no reason why it should
use prototypes. In the testsuite we have over 5000 C tests that do
something like that.
Furthermore, this should have been suggested in stage1, not 3 days before
end of stage3 IMNSHO.
Jakub