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]

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


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.

Jason


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