Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(754)

Unified Diff: include/v8config.h

Issue 1212163003: Using "defined" in macro causes undefined behavior. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8config.h
diff --git a/include/v8config.h b/include/v8config.h
index 24b0e5ff3ef64d7ff11f30d495ff7953c0bc4f61..4f4b2cd55eae9b62f60b9071e5000b7a197eb10b 100644
--- a/include/v8config.h
+++ b/include/v8config.h
@@ -5,6 +5,8 @@
#ifndef V8CONFIG_H_
#define V8CONFIG_H_
+// clang-format off
+
// Platform headers for feature detection below.
#if defined(__ANDROID__)
# include <sys/cdefs.h>
@@ -230,10 +232,15 @@
#elif defined(__GNUC__)
# define V8_CC_GNU 1
-// Intel C++ also masquerades as GCC 3.2.0
-# define V8_CC_INTEL (defined(__INTEL_COMPILER))
-# define V8_CC_MINGW32 (defined(__MINGW32__))
-# define V8_CC_MINGW64 (defined(__MINGW64__))
+# if defined(__INTEL_COMPILER) // Intel C++ also masquerades as GCC 3.2.0
+# define V8_CC_INTEL 1
+# endif
+# 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_HAS___ALIGNOF__ (V8_GNUC_PREREQ(4, 3, 0))
@@ -412,4 +419,6 @@ namespace v8 { template <typename T> class AlignOfHelper { char c; T t; }; }
#define V8_WARN_UNUSED_RESULT /* NOT SUPPORTED */
#endif
+// clang-format on
+
#endif // V8CONFIG_H_
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698