[cfe-commits] [cfe-dev] math.h on Windows

Douglas Gregor dgregor at apple.com
Wed Oct 14 10:34:18 PDT 2009


(CC'ing cfe-dev)

On Oct 14, 2009, at 10:13 AM, Sean Hunt wrote:

>> What is the actual issue with the redefinition of wchar_t? Are they
>> creating a typedef of wchar_t in their headers? Does the VC++  
>> compiler
>> implicitly define _WCHAR_T_DEFINED?
>>
>> Regarding the patch itself: if VC++ is implicitly defining
>> _WCHAR_T_DEFINED, then we should be doing so based on the Microsoft
>> flag in the preprocessor-definitions, since it is effectively a
>> Microsoft extension. Defining this information in the target probably
>> isn't what we want.
>
> http://msdn.microsoft.com/en-us/library/dh8che7s(VS.80).aspx explains
> the behavior, which I think should can and should emulate.

Agreed. I think that means that we should be defining _WCHAR_T_DEFINED  
and _NATIVE_WCHAR_T_DEFINED when Microsoft extensions are enabled in C+ 
+. For C, someone with access to VC++ will need to check whether they  
are also defined in C mode, and we can do whatever VC++ does.

	- Doug



More information about the cfe-commits mailing list