[Python-bugs-list] [ python-Bugs-693094 ] Python does not build --with-pydebug on Tru64 with vendor cc
SourceForge.net
noreply@sourceforge.net
Tue, 25 Feb 2003 10:48:58 -0800
Bugs item #693094, was opened at 2003-02-25 11:48
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=693094&group_id=5470
Category: Build
Group: Platform-specific
Status: Open
Resolution: None
Priority: 5
Submitted By: Stephan A. Terre (sfiedler)
Assigned to: Nobody/Anonymous (nobody)
Summary: Python does not build --with-pydebug on Tru64 with vendor cc
Initial Comment:
The default standards-compliance level for the
Compaq/HP compiler defines the assert macro using the
if statement (if...then) rather than the ternary if
expression (?:). As a result, when Python is configured
--with-pydebug (so NDEBUG is not defined), the macro
Py_SAFE_DOWNCAST expands to illegal C (containing a
statement inside an expression).
This can be fixed by asserting the -std switch to the
vendor compiler. Testing of 2.2.2 CVS and 2.3 CVS
indicates that there is no bad side effect to asserting
-std.
I hope to develop a fix for this in configure.in
sometime in the next couple of days. When I have done
so, I will attach it to this bug.
For the record, here are the variations of the -std
switch on the vendor compiler:
-std0
Selects the K & R language mode. This is the
default. Enforces the K &
R programming style, with certain ANSI extensions
in areas where the K
& R behavior is undefined or ambiguous. In
general, -std0 compiles most
pre-ANSI C programs and produces expected
results. The -std0 option
causes the __STDC__ macro to be undefined.
-std
Selects the relaxed ANSI language mode. Enforces
the ANSI C standard,
but allows some common programming practices
disallowed by the stan-
dard.
This option does not restrict the Tru64 UNIX name
space (for example,
the names defined in system header files). To
restrict that name space
so that only ANSI C reserved names are visible
from the ANSI C header
files, use the _ANSI_C_SOURCE macro. See
standards(5) for more details.
This option causes the macro __STDC_ to be
defined to 0.
-std1
Selects the strict ANSI language mode. Strictly
enforces the ANSI C
standard and all its prohibitions (such as those
that apply to the han-
dling of void types, the definition of lvalues in
expressions, the mix-
ing of integrals and pointers, and the
modification of rvalues).
This option does not restrict the Tru64 UNIX name
space (for example,
the names defined in system header files). To
restrict that name space
so that only ANSI C reserved names are visible
from the ANSI C header
files, use the _ANSI_C_SOURCE macro. See
standards(5) for more details.
This option causes the macro __STDC_ to be
defined to 1. Note that this
option also affects linker-defined symbols. See
ld(1) for more infor-
mation.
This option turns on ANSI aliasing rules
(-ansi_alias option).
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=693094&group_id=5470