Skip Montanaro wrote: > 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. That is not true. GCC does not define that macro, on any platform. Some system header may define it, though. I believe this is a bug in the system - the macro *should* be defined in the application. What system are you referring to, and where does that define _XOPEN_SOURCE? Is that definition conditional? > Perhaps adding > > #pragma GCC system_header > > to pyconfig.h.in would be acceptable though. I'd prefer to solve the problem properly. If the system defines something, and we define it differently, this *is* a problem, and deserves a warning. We should find out why that is, and what can be done about. Perhaps we should not define _XOPEN_SOURCE on that platform until the vendor fixes the platform bug, or we should aim at defining it the same way the vendor does. Silencing errors is a risky thing. Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4