This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to fix gcc.dg/pr35899.c failure on IA64 HP-UX
Steve Ellcey <sje@cup.hp.com> writes:
> On Thu, 2008-07-31 at 14:06 -0700, Ian Lance Taylor wrote:
>
>> That is what I would have expected gcc to do already. If it's not
>> doing that, I think there is a bug.
>>
>> Ian
>
> No, it is giving warnings (and then a seg fault) on my machines. After
> my patch I just get the following warnings:
>
> $ obj_gcc/gcc/cc1 -quiet x.c
> x.c:7: warning: conflicting types for 'bar'
> x.c:3: warning: previous implicit declaration of 'bar' was here
>
> I will create a patch to change these warnings to errors.
Ah, sorry. I think a warning is OK here. Making it an error will
cause some vaguely-correct old code to stop working.
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