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

Side by Side Diff: third_party/WebKit/Source/wtf/Compiler.h

Issue 1420613005: document COMPILER(GCC) and COMPILER(MSVC) a little better (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: document COMPILER(GCC) and COMPILER(MSVC) a little better Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 24 matching lines...) Expand all
35 /* COMPILER_QUIRK() - whether the compiler being used to build the project requi res a given quirk. */ 35 /* COMPILER_QUIRK() - whether the compiler being used to build the project requi res a given quirk. */
36 #define COMPILER_QUIRK(WTF_COMPILER_QUIRK) (defined WTF_COMPILER_QUIRK_##WTF_COM PILER_QUIRK && WTF_COMPILER_QUIRK_##WTF_COMPILER_QUIRK) 36 #define COMPILER_QUIRK(WTF_COMPILER_QUIRK) (defined WTF_COMPILER_QUIRK_##WTF_COM PILER_QUIRK && WTF_COMPILER_QUIRK_##WTF_COMPILER_QUIRK)
37 37
38 /* ==== COMPILER() - the compiler being used to build the project ==== */ 38 /* ==== COMPILER() - the compiler being used to build the project ==== */
39 39
40 /* COMPILER(CLANG) - Clang */ 40 /* COMPILER(CLANG) - Clang */
41 #if defined(__clang__) 41 #if defined(__clang__)
42 #define WTF_COMPILER_CLANG 1 42 #define WTF_COMPILER_CLANG 1
43 #endif 43 #endif
44 44
45 /* COMPILER(MSVC) - Microsoft Visual C++ */ 45 /* COMPILER(MSVC) - Microsoft Visual C++ (and Clang when compiling for Windows). */
46 #if defined(_MSC_VER) 46 #if defined(_MSC_VER)
47 #define WTF_COMPILER_MSVC 1 47 #define WTF_COMPILER_MSVC 1
48 #endif 48 #endif
49 49
50 /* COMPILER(GCC) - GNU Compiler Collection */ 50 /* COMPILER(GCC) - GNU Compiler Collection (and Clang when compiling for platfor ms other than Windows). */
51 #if defined(__GNUC__) 51 #if defined(__GNUC__)
52 #define WTF_COMPILER_GCC 1 52 #define WTF_COMPILER_GCC 1
53 #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL __) 53 #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL __)
54 #define GCC_VERSION_AT_LEAST(major, minor, patch) (GCC_VERSION >= (major * 10000 + minor * 100 + patch)) 54 #define GCC_VERSION_AT_LEAST(major, minor, patch) (GCC_VERSION >= (major * 10000 + minor * 100 + patch))
55 #else 55 #else
56 /* Define this for !GCC compilers, just so we can write things like GCC_VERSION_ AT_LEAST(4, 1, 0). */ 56 /* Define this for !GCC compilers, just so we can write things like GCC_VERSION_ AT_LEAST(4, 1, 0). */
57 #define GCC_VERSION_AT_LEAST(major, minor, patch) 0 57 #define GCC_VERSION_AT_LEAST(major, minor, patch) 0
58 #endif 58 #endif
59 59
60 /* ==== Compiler features ==== */ 60 /* ==== Compiler features ==== */
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 /* NO_SANITIZE_UNRELATED_CAST - Disable runtime checks related to casts between 162 /* NO_SANITIZE_UNRELATED_CAST - Disable runtime checks related to casts between
163 * unrelated objects (-fsanitize=cfi-unrelated-cast or -fsanitize=vptr). */ 163 * unrelated objects (-fsanitize=cfi-unrelated-cast or -fsanitize=vptr). */
164 164
165 #if COMPILER(CLANG) 165 #if COMPILER(CLANG)
166 #define NO_SANITIZE_UNRELATED_CAST __attribute__((no_sanitize("cfi-unrelated-cas t", "vptr"))) 166 #define NO_SANITIZE_UNRELATED_CAST __attribute__((no_sanitize("cfi-unrelated-cas t", "vptr")))
167 #else 167 #else
168 #define NO_SANITIZE_UNRELATED_CAST 168 #define NO_SANITIZE_UNRELATED_CAST
169 #endif 169 #endif
170 170
171 #endif /* WTF_Compiler_h */ 171 #endif /* WTF_Compiler_h */
OLDNEW
« 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