This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH/RFC] enable -Wstrict-prototypes (PR 82922)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]