[Python-Dev] use of #pragma GCC system_header to suppress _XOPEN_SOURCE warnings (original) (raw)

Skip Montanaro skip at pobox.com
Fri Aug 6 00:24:27 CEST 2004


>> At work the goal for our C++ build environment is "no warnings with
>> gcc -Wall".  We are not there yet (and thankfully I am not a
>> participant in that particular holy grail), but those involved in
>> that effort encountered a warning the other day generated because
>> _XOPEN_SOURCE is defined in pyconfig.h.  Unfortunately GCC also
>> defines it, so a "macro redefined" warning is emitted when compiling
>> with GCC and including Python.h.

Martin> That is not true. GCC does not define that macro, on any
Martin> platform.

Martin> Some system header may define it, though.

Well, yeah, that's what I meant. My apologies for the imprecise statement.

Martin> I believe this is a bug in the system - the macro *should* be
Martin> defined in the application. What system are you referring to,
Martin> and where does that define _XOPEN_SOURCE? Is that definition
Martin> conditional?

The platform is Solaris/Intel (2.8 and/or 2.9). I'll have to get you more complete details tomorrow. The involved folks are gone for the day.

Martin> Silencing errors is a risky thing.

Agreed. I made them investigate the python-dev archives before contributing. They said, "Who is this Martin guy?" :-)

wasn't-this-a-pleasant-diversion-from-pie-syntax?-ly y'rs,

Skip



More information about the Python-Dev mailing list