[Python-bugs-list] [ python-Bugs-539719 ] IBM's xlc compiler needs extra option

noreply@sourceforge.net noreply@sourceforge.net
Fri, 05 Apr 2002 07:24:39 -0800


Bugs item #539719, was opened at 2002-04-05 14:21
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=539719&group_id=5470

Category: Build
Group: Platform-specific
Status: Open
Resolution: None
Priority: 5
Submitted By: M.-A. Lemburg (lemburg)
Assigned to: Martin v. Löwis (loewis)
Summary: IBM's xlc compiler needs extra option

Initial Comment:
An mx user complained to me about the xlc compiler
not handling forward declarations of static variables
correctly.

He found that with the added compiler option '-qlanglvl=ansi'
things work as expected. I currently don't have access to AIX,
but the option suggests that xlc then behaves in an ANSI
compatible way, which can't be that bad :-)

I'd suggest to add that option as default to Python builds,
so that all distutils based extensions automatically
pick it up for compilation (distutils reads the Python
Makefile for compiler settings).

Hope this one is right for you, Martin.


----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2002-04-05 17:24

Message:
Logged In: YES 
user_id=21627

I don't want to change this, as I don't have access to an
AIX system, either; I might consider accepting a well-tested
patch, though. However,

http://usgibm.nersc.gov/vac/ref/compopts/ruoptlvl.htm

suggests that the default langlevel is ANSI, so I don't
trust the recommendation that adding it helps. Furthermore,
I'm concerned that something else may break, since the ANSI
settings of the compilers tend to disable a lot of useful
functions (which are merely POSIX instead of being even ANSI).

For your specific problem: Python.h offers the staticforward
define, which ought to correctly use static for each each
compiler.

If you think you need a platform-specific work-around, you
can add a pragma langlvl (see URL).



----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=539719&group_id=5470