This is the mail archive of the gcc@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: Old K+R compatibility goo in c-decl.c::duplicate_decls - preserve?


Mark Mitchell <mark@codesourcery.com> writes:

> On Sun, 2003-12-14 at 00:10, Zack Weinberg wrote:
> > While working on a bunch of outstanding c-decl.c issues I came across
> > these special cases in duplicate_decls:
> > 
> >   /* Permit char *foo () to match void *foo (...) if not pedantic,
> >      if one of them came from a system header file.  */
> > 
> >   /* Permit void foo (...) to match int foo (...) if the latter is the
> >      definition and implicit int was used.  See
> >      c-torture/compile/920625-2.c.  */
> > 
> >   /* Permit char *foo (int, ...); followed by char *foo ();
> >      if not pedantic.  */
> > 
> > 
> > All of these relax C90's requirements for the sake of pre-standard
> > code.  We've removed most of the support for pre-standard code; I
> > would like to know whether people think these special cases can be
> > removed too.  This would be a small but nontrivial simplification to
> > duplicate_decls.
> 
> FWIW, I'd be happy to see these go.

I think the most serious problems have to do with system header files.
I expect that SunOS triggers all of these, but don't know if we still
care about it.  Maybe we could use fixincludes in the troublesome
cases, once we find them.

Assuming the system header problem can be fixed, then I think I'd also
be happy to see these go.  They are trivial to fix in the user's source.

-- 
- Geoffrey Keating <geoffk@geoffk.org>


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