PATCH: Replace _XXX with XXX_P

Andreas Schwab schwab@linux-m68k.org
Tue Dec 15 23:45:00 GMT 2009


"H.J. Lu" <hjl.tools@gmail.com> writes:

> On Tue, Dec 15, 2009 at 10:02 AM, Andreas Schwab <schwab@redhat.com> wrote:
>> "H.J. Lu" <hjl.tools@gmail.com> writes:
>>
>>> [hjl@gnu-6 tmp]$ gcc -S x.c -Wshadow
>>> x.c: In function ‘foo’:
>>> x.c:4: warning: declaration of ‘_mm_load_pd’ shadows a global declaration
>>> /usr/lib/gcc/x86_64-redhat-linux/4.4.2/include/emmintrin.h:104:
>>> warning: shadowed declaration is here
>>> [hjl@gnu-6 tmp]$
>>>
>>> Is this a bug in gcc?
>>
>> No, why do you think so?
>>
>
> If you replace _mm_load_pd with _open, it is what happens on
> mingw, which you think is a bug.

No, it just shows that -Wshadow is a bad idea unless you have complete
control over the global namespace.

(You didn't say in your original mail that this is -Wshadow related.)

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



More information about the Binutils mailing list