This is the mail archive of the 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: GNU C: Implicit int and implicit function definitions

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 (these are warnings (pedwarns) by default in C99 mode, 
not restricted to -pedantic).  It's possible that C code used in practice 
has changed sufficiently over the years that continuing to build legacy 
code using these features (while using default compiler options, which now 
imply -std=gnu11) is less of a concern; information about how many 
warnings for implicit int and implicit function declarations there are in 
distribution builds would be useful.

C++ has various standard-required-diagnostics as permerrors (error by 
default, warning with -fpermissive).  That might be a plausible model for 
C as well (there are plenty of always-on pedwarns, some of which could be 
considered for making into permerrors), though in the present case we 
already have more specific options for these diagnostics.

Joseph S. Myers

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