From my experience with Visual C++, using /Za isn't a good idea.
When you set that, the compiler become very pedantic about following the
ANSI speck to the letter, which usually means common posix functions
aren't available under their normal names (The ansi spec says if the
compiler defines functions beyond what in the spec, it's recommended
they start with "_" to not conflict with application name space).
Compatibility with GCC is reduced when you use /Za.

-----Original Message-----
[mailto:[EMAIL PROTECTED] On Behalf Of Tom Lane
Sent: Tuesday, October 03, 2006 8:51 AM
To: Magnus Hagander
Cc: Jeremy Drake; PostgreSQL Hackers
Subject: Re: [HACKERS] src/tools/msvc usage instructions

"Magnus Hagander" <[EMAIL PROTECTED]> writes:
>> which looks like they figured out that they needed to check 
>> for MicroSoft C explicitly.  I have no idea why they do not 
>> define __STDC__ however.

> Can we just define __STDC__ when compiling that file (or rather, when
> compiling any bison-generated output file)? Or is that likely to cause
> *other* issues?

That seems pretty risky.  Better to use the /Za switch or whatever it
was to get the compiler to assert it for itself.  We have precedent for
adding yes-we'd-like-a-standard-compiler-please switches where
necessary, for instance adding -Ae to CFLAGS for HP's compiler.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?


Reply via email to