Re: GNU C: Implicit int and implicit function definitions

2016-05-20 Thread Joseph Myers
On Fri, 20 May 2016, Andrew Haley wrote: > Given this, I do not understand why GCC does not treat implicit int as > a hard error. Because in C the existing practice has been that we support the union of all features and extensions that can sensibly be supported with the given language version

Re: GNU C: Implicit int and implicit function definitions

2016-05-20 Thread Joseph Myers
On Fri, 20 May 2016, Jeff Law wrote: > I think it's worth revisiting as well, burying in -pedantic seems wrong given > the kinds of failures we can see. It's not in -pedantic. The warnings are on by default for C99/C11 (and become errors with -pedantic-errors or the -Werror= options). --

Re: GNU C: Implicit int and implicit function definitions

2016-05-20 Thread Jeff Law
On 05/20/2016 03:24 AM, Florian Weimer wrote: On 05/20/2016 11:22 AM, Andreas Schwab wrote: Florian Weimer writes: C99 got rid of implicit function definitions and implicit ints. Would it be possible to remove them retroactively from the -std=gnu99 and -std=gnu11 language

Re: GNU C: Implicit int and implicit function definitions

2016-05-20 Thread Florian Weimer
On 05/20/2016 11:22 AM, Andreas Schwab wrote: Florian Weimer writes: C99 got rid of implicit function definitions and implicit ints. Would it be possible to remove them retroactively from the -std=gnu99 and -std=gnu11 language variants (as well as -std=c99 and -std=c11),

Re: GNU C: Implicit int and implicit function definitions

2016-05-20 Thread Andreas Schwab
Florian Weimer writes: > C99 got rid of implicit function definitions and implicit ints. Would it > be possible to remove them retroactively from the -std=gnu99 and > -std=gnu11 language variants (as well as -std=c99 and -std=c11), so that > they are rejected by default?

Re: GNU C: Implicit int and implicit function definitions

2016-05-20 Thread Andrew Haley
On 05/20/2016 10:02 AM, Florian Weimer wrote: > On 05/20/2016 10:30 AM, lh mouse wrote: >> Implicit function declarations result in warnings since C99 or GNU99 and >> '-pedantic-errors' turns them into errors. >> The same goes for implicit return types. > > The warnings typically do not stop the

Re: GNU C: Implicit int and implicit function definitions

2016-05-20 Thread Florian Weimer
On 05/20/2016 10:30 AM, lh mouse wrote: Implicit function declarations result in warnings since C99 or GNU99 and '-pedantic-errors' turns them into errors. The same goes for implicit return types. The warnings typically do not stop the build, and thus are not really helpful when you are

Re: GNU C: Implicit int and implicit function definitions

2016-05-20 Thread lh mouse
- 发件人:Florian Weimer <fwei...@redhat.com> 发送日期:2016-05-20 16:17 收件人:GCC 抄送: 主题:GNU C: Implicit int and implicit function definitions I just spend an hour hunting down someone else's GCC code generation bug, when it turned out it was caused by an implicit function definition, where th

GNU C: Implicit int and implicit function definitions

2016-05-20 Thread Florian Weimer
I just spend an hour hunting down someone else's GCC code generation bug, when it turned out it was caused by an implicit function definition, where the real return type was incompatible with int. C99 got rid of implicit function definitions and implicit ints. Would it be possible to remove