[New-bugs-announce] [issue31696] don't mention GCC in sys.version when built with Clang

Benjamin Peterson report at bugs.python.org
Wed Oct 4 16:56:25 EDT 2017


New submission from Benjamin Peterson <benjamin at python.org>:

When built with clang, Python reports that it was built with something like "GCC 4.2.1 Compatible Clang 4.0.0 (tags/RELEASE_400/rc1)". This is because clang pretends to be GCC 4.2.1 for the purposes of the __VERSION__ preprocessor macro. We should use __clang_version__ when clang is being used.

(Possibly we should simply use the first line of "$CC --version" as the compiler version of record rather than writing preprocessor tests in getcompiler.c.)

----------
components: Build
keywords: easy (C)
messages: 303731
nosy: benjamin.peterson
priority: normal
severity: normal
status: open
title: don't mention GCC in sys.version when built with Clang
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31696>
_______________________________________


More information about the New-bugs-announce mailing list