Browse Source

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.
pull/755/head
Fredrik Roubert 11 years ago
parent
commit
1107e0f7ce
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      cpp/src/phonenumbers/base/basictypes.h
  2. +1
    -1
      tools/cpp/src/base/basictypes.h

+ 1
- 1
cpp/src/phonenumbers/base/basictypes.h View File

@ -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


+ 1
- 1
tools/cpp/src/base/basictypes.h View File

@ -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


Loading…
Cancel
Save