From 1107e0f7ce5cce04b1f85d5cae92524ed348274e Mon Sep 17 00:00:00 2001 From: Fredrik Roubert Date: Mon, 20 Jul 2015 11:44:11 +0200 Subject: [PATCH] Replace defined(COMPILER_GCC) with defined(__GNUC__). The preprocessor expression defined(COMPILER_GCC) is used in code copied from the Chromium project, but COMPILER_GCC is not defined by GCC itself, but by the following expression in Chromium's build_config.h: #if defined(__GNUC__) #define COMPILER_GCC 1 #elif // ... It must therefore be changed when copying the code out of the Chromium code base. --- cpp/src/phonenumbers/base/basictypes.h | 2 +- tools/cpp/src/base/basictypes.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/src/phonenumbers/base/basictypes.h b/cpp/src/phonenumbers/base/basictypes.h index ed32ae9ae..865edcd22 100644 --- a/cpp/src/phonenumbers/base/basictypes.h +++ b/cpp/src/phonenumbers/base/basictypes.h @@ -205,7 +205,7 @@ struct CompileAssert { // is important for some other reason.) // Use like: // int x ALLOW_UNUSED = ...; -#if defined(COMPILER_GCC) +#if defined(__GNUC__) #define ALLOW_UNUSED __attribute__((unused)) #else #define ALLOW_UNUSED diff --git a/tools/cpp/src/base/basictypes.h b/tools/cpp/src/base/basictypes.h index 9d7e12c75..4b8a3988d 100644 --- a/tools/cpp/src/base/basictypes.h +++ b/tools/cpp/src/base/basictypes.h @@ -246,7 +246,7 @@ struct CompileAssert { // is important for some other reason.) // Use like: // int x ALLOW_UNUSED = ...; -#if defined(COMPILER_GCC) +#if defined(__GNUC__) #define ALLOW_UNUSED __attribute__((unused)) #else #define ALLOW_UNUSED