> -----Original Message----- > From: Martin Sebor [mailto:[EMAIL PROTECTED] > Sent: Friday, November 30, 2007 2:51 AM > To: stdcxx-dev@incubator.apache.org > 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? Farid.