> -----Original Message----- > From: Martin Sebor [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 22, 2006 4:08 AM > To: [email protected] > Subject: Re: Windows infrastructure for generating > VisualStudio projects and solution(s) > > > - added optional parameter /WCHAR_T:{yes|no}: > > when yes, the native wchar_t enabled; > > when no, the native wchar_t disabled; > > when no option specified, the native wchar_t is > default to the > > compiler. > > I think a more general solution might be called for, one that > would let users specify additional command line options to > the compiler or linker. The GNU makefile infrastructure uses > CPPOPTS, CXXOPTS, and LDOPTS for this purpose and simply > appends the values of these variables to the end of CPPFLAGS, > CXXFLAGS, and LDFLAGS.
It's a good idea! > > - "Force Conformance in for Loop Scope" is turned on (I see no > > problem with it) > > You shouldn't see any problems since that's how all > conforming compilers are required to behave and how most in > fact do. But not every compiler conforms and MSVC is an > example of one that doesn't, at least not out of the box. In > order to make sure we can handle those as well we need to > test the library both ways (with and without the feature). > I.e., we cannot rely on the feature in our library headers > (we can fake it in our sources by the well known trick: > '#define for if (0); else for'). If the compiler do not conform in "for loop scope" then generated config.h file will contain #define _RWSTD_NO_FOR_LOCAL_SCOPE. I searched _RWSTD_NO_FOR_LOCAL_SCOPE macro in source files and found it in examples\include\examples.h and tests\include\testdefs.h files only: ----------------- #ifdef _RWSTD_NO_FOR_LOCAL_SCOPE # define for if (0) ; else for #endif // _RWSTD_NO_FOR_LOCAL_SCOPE ----------------- The conslusions: 1. the stdlib and utils itself are independent from compiler "for loop scope" conformance (because of they not uses _RWSTD_NO_FOR_LOCAL_SCOPE macro); 2. the examples and tests itself are independed from compiler "for loop scope" conformance too (because of they get the conformance by defining "for" as "if (0); else for" in case when compiler do not conform). What kind of problem could be when user link his project (compiled by MSVC7 without /Zc:forScope option enabled) with the stdcxx library (compiled with this option enabled)? Could you, please, show the example? BTW in MSVC8 the "for loop scope" conformance and native wchar_t supporting are enabled by default. Farid.
