This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Antwort: Re: Patch to fix gcc.dg/pr35899.c failure on IA64 HP-UX
- From: Markus Milleder <markus dot milleder at generali dot at>
- To: sje at cup dot hp dot com
- Cc: gcc-patches at gcc dot gnu dot org, Ian Lance Taylor <iant at google dot com>, Andrew Pinski <pinskia at gmail dot com>
- Date: Fri, 1 Aug 2008 09:43:06 +0200
- Subject: Antwort: Re: Patch to fix gcc.dg/pr35899.c failure on IA64 HP-UX
Ian Lance Taylor <iant@google.com> schrieb am 31.07.2008 23:28:37:
>
> On Thu, 2008-07-31 at 14:23 -0700, Ian Lance Taylor wrote:
>
> > Ah, sorry. I think a warning is OK here. Making it an error will
> > cause some vaguely-correct old code to stop working.
>
> Yes, I just looked at c-decl.c and we do appear to be explicitly
> allowing this.
>
> The comment even says:
>
> /* Permit void foo (...) to match an earlier call to foo (...) with
> no declared type (thus, implicitly int). */
>
> > Andrew is right that this code isn't going to work. But I think your
> > one-line patch is a step in the right direction. I'll approve that
> > patch, unless you want to write a better one. A better patch would be
> > to check for this specific case and give an error.
> >
> > Ian
>
> I'll go with the original patch and let the language lawyers argue about
> the rest of it.
>
Would it be possible to record if the result of a default-int function
has ever been used and to error out if the function turns out to be void ?
Markus Milleder