This is the mail archive of the gcc-patches@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]

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



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