public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Old K+R compatibility goo in c-decl.c::duplicate_decls - preserve?
@ 2003-12-14  8:15 Zack Weinberg
  2003-12-15 20:26 ` Mark Mitchell
  0 siblings, 1 reply; 3+ messages in thread
From: Zack Weinberg @ 2003-12-14  8:15 UTC (permalink / raw)
  To: gcc; +Cc: Joseph Meyers


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.

zw

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Old K+R compatibility goo in c-decl.c::duplicate_decls - preserve?
  2003-12-14  8:15 Old K+R compatibility goo in c-decl.c::duplicate_decls - preserve? Zack Weinberg
@ 2003-12-15 20:26 ` Mark Mitchell
  2003-12-15 21:47   ` Geoff Keating
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Mitchell @ 2003-12-15 20:26 UTC (permalink / raw)
  To: Zack Weinberg; +Cc: gcc, Joseph Meyers

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.

-- 
Mark Mitchell <mark@codesourcery.com>
CodeSourcery, LLC

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Old K+R compatibility goo in c-decl.c::duplicate_decls - preserve?
  2003-12-15 20:26 ` Mark Mitchell
@ 2003-12-15 21:47   ` Geoff Keating
  0 siblings, 0 replies; 3+ messages in thread
From: Geoff Keating @ 2003-12-15 21:47 UTC (permalink / raw)
  To: Mark Mitchell; +Cc: gcc, Joseph Meyers

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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-12-15 21:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-14  8:15 Old K+R compatibility goo in c-decl.c::duplicate_decls - preserve? Zack Weinberg
2003-12-15 20:26 ` Mark Mitchell
2003-12-15 21:47   ` Geoff Keating

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).