stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <>
Subject Re: svn commit: r597425 - in /incubator/stdcxx/branches/4.2.x: include/ansi/cwchar tests/strings/21.cwchar.cpp
Date Fri, 14 Dec 2007 21:07:34 GMT
Farid Zaripov wrote:
>> -----Original Message-----
>> From: Martin Sebor [] 
>> Sent: Friday, November 30, 2007 2:51 AM
>> To:
>> Subject: Re: svn commit: r597425 - in 
>> /incubator/stdcxx/branches/4.2.x: include/ansi/cwchar 
>> tests/strings/21.cwchar.cpp
>>>   Yes, potentially here might be a problems.
>> So maybe we need to rethink the original strategy of 
>> #undefining the macros only when _RWSTD_STRICT_ANSI is 
>> #defined. Or is there a way to prevent the expansion of the 
>> macros in the using declarations?
>> Btw., it occurs to me that if they are defined as function 
>> macros (i.e., #define getwc() as opposed to #define getwc, 
>> without the parentheses), mentioning getwc w/o an argument 
>> list as is done in using declarations will not cause them to 
>> be expanded. So the problem only exists for object macros 
>> (i.e., those that aren't defined with parentheses).
>   If the using directives are decorated by #ifndef _RWSTD_NO_funname
> there would be no problems in case the STDCXX-451 issue resolved.
>>>   BTW in ansi/cctype and ansi/cmath headers the masking macros are 
>>> #undefined unconditionally.
>>>  I think first we need to collect information how these macros are 
>>> implemented on different platforms and then decide what 
>> should we do.
>> I suppose we should do that. But either way we decide we 
>> should be consistent. So if there already are unconditional 
>> #undefs in several other headers we might as well follow suit 
>> with cwchar (and wchar.h) until we gather more information 
>> and decide to change all the other headers to #undef all the 
>> other macros conditionally.
>   Agreed. So it's safe to #undefine getwc and putwc on MSVC.
> The gcc on Linux doesn't #define these macros. What about
> other platforms?

Are you looking for data for just getwc and putwc or all the
other symbols from <cwchar> (or the whole C library?)

If just the former the macros aren't defined on any of AIX
(XLC++ 9.0), HP-UX (aCC 3.73), IRIX (MIPSpro 7.41), Solaris
(Sun C++ 5.9), or Tru64 (HP/Compaq C++), but they are both
#defined on FreeBSD (gcc 3.4.4).


> Farid.

View raw message