[patch i386]:Ensure intrinsic functions are declared "C"

Richard Guenther richard.guenther@gmail.com
Wed May 12 15:10:00 GMT 2010


On Wed, May 12, 2010 at 5:07 PM, Jason Merrill <jason@redhat.com> wrote:
> On 05/12/2010 10:02 AM, Richard Guenther wrote:
>>>
>>> The issue, which occures here is, that a user wants - for example - to
>>> include <xmmintrin.h>  header in C++. Now he includes afterwards for
>>> windows the math.h/intrin.h (which both have explicit C language
>>> scope). What happens here? A bunch of warnings/failures caused by C++
>>> vs. C language scope.
>>> So why we shouldn't care?
>>
>> You'll get ODR violation errors anyway in that case.
>
> I don't think so.  If the Windows header just has declarations, they can
> merge just fine with the xmmintrin.h definitions -- if they have the right
> language linkage.
>
> You'd only get an ODR violation if you have a class/enum/inline/template
> defined in multiple translation units that uses the intrinsics but sometimes
> sees the definitions in xmmintrin and sometimes not.

Can you show us a testcase that shows an example of the conflict?

Richard.

> Jason
>



More information about the Gcc-patches mailing list