This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: GCC error when using pyerrors.h
Type: compile error Stage: resolved
Components: Extension Modules, Interpreter Core Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: ndparker, python-dev
Priority: normal Keywords:

Created on 2012-06-03 19:31 by ndparker, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg162230 - (view) Author: André Malo (ndparker) * Date: 2012-06-03 19:31
GCC error when using pyerrors.h

This ist my first attempt to test an extension with python 3.3. I've been using the 3.3.0a4 tarball.

I'm using very strict compiler settings when compiling my extension modules, especially -Wall -Werror (along with a lot more flags, like -pedantic, -std=c89).

Including Python.h includes pyerrors.h which emits:

/usr/include/python3.3/pyerrors.h:91:8: error: "__GNUC_MAJOR__" is not defined
/usr/include/python3.3/pyerrors.h:92:8: error: "__GNUC_MAJOR__" is not defined

I'm not sure, which of the compiler flags is responsible for dropping those macros. Simple defined() checks should fix that problem though.
msg162244 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-06-04 01:18
New changeset 696d3631a4a1 by Benjamin Peterson in branch 'default':
__GNUC__ does not imply gcc version is present, so just check for version (closes #14994)
http://hg.python.org/cpython/rev/696d3631a4a1
History
Date User Action Args
2022-04-11 14:57:31adminsetgithub: 59199
2012-06-04 01:18:28python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg162244

resolution: fixed
stage: resolved
2012-06-03 19:31:08ndparkercreate