Commit cd85493f authored by bmeurer's avatar bmeurer Committed by Commit bot

Using "defined" in macro causes undefined behavior.

R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/1212163003

Cr-Commit-Position: refs/heads/master@{#29342}
parent c4121b28
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
#ifndef V8CONFIG_H_ #ifndef V8CONFIG_H_
#define V8CONFIG_H_ #define V8CONFIG_H_
// clang-format off
// Platform headers for feature detection below. // Platform headers for feature detection below.
#if defined(__ANDROID__) #if defined(__ANDROID__)
# include <sys/cdefs.h> # include <sys/cdefs.h>
...@@ -230,10 +232,15 @@ ...@@ -230,10 +232,15 @@
#elif defined(__GNUC__) #elif defined(__GNUC__)
# define V8_CC_GNU 1 # define V8_CC_GNU 1
// Intel C++ also masquerades as GCC 3.2.0 # if defined(__INTEL_COMPILER) // Intel C++ also masquerades as GCC 3.2.0
# define V8_CC_INTEL (defined(__INTEL_COMPILER)) # define V8_CC_INTEL 1
# define V8_CC_MINGW32 (defined(__MINGW32__)) # endif
# define V8_CC_MINGW64 (defined(__MINGW64__)) # if defined(__MINGW32__)
# define V8_CC_MINGW32 1
# endif
# if defined(__MINGW64__)
# define V8_CC_MINGW64 1
# endif
# define V8_CC_MINGW (V8_CC_MINGW32 || V8_CC_MINGW64) # define V8_CC_MINGW (V8_CC_MINGW32 || V8_CC_MINGW64)
# define V8_HAS___ALIGNOF__ (V8_GNUC_PREREQ(4, 3, 0)) # define V8_HAS___ALIGNOF__ (V8_GNUC_PREREQ(4, 3, 0))
...@@ -412,4 +419,6 @@ namespace v8 { template <typename T> class AlignOfHelper { char c; T t; }; } ...@@ -412,4 +419,6 @@ namespace v8 { template <typename T> class AlignOfHelper { char c; T t; }; }
#define V8_WARN_UNUSED_RESULT /* NOT SUPPORTED */ #define V8_WARN_UNUSED_RESULT /* NOT SUPPORTED */
#endif #endif
// clang-format on
#endif // V8CONFIG_H_ #endif // V8CONFIG_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment