closes bpo-43278: remove unnecessary leading '\n' from COMPILER when build with GCC/Clang (GH-24606)

Automerge-Triggered-By: GH:benjaminp
This commit is contained in:
Joseph Shen 2021-02-26 12:24:21 +08:00 committed by GitHub
parent c6ccdfb479
commit 28a30bc2e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -0,0 +1 @@
Always put compiler and system information on the first line of the REPL welcome message.

View File

@ -8,9 +8,9 @@
// Note the __clang__ conditional has to come before the __GNUC__ one because
// clang pretends to be GCC.
#if defined(__clang__)
#define COMPILER "\n[Clang " __clang_version__ "]"
#define COMPILER "[Clang " __clang_version__ "]"
#elif defined(__GNUC__)
#define COMPILER "\n[GCC " __VERSION__ "]"
#define COMPILER "[GCC " __VERSION__ "]"
// Generic fallbacks.
#elif defined(__cplusplus)
#define COMPILER "[C++]"