]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/cppbuiltin.c
Correct a function pre/postcondition [PR102403].
[thirdparty/gcc.git] / gcc / cppbuiltin.c
index aae6217cef9f6d4cfec2b7b126a82452e3a52632..2c6bcfa92cfcf15f480e1812b8cd1c09f78c4cf9 100644 (file)
@@ -1,5 +1,5 @@
 /* Define builtin-in macros for all front ends that perform preprocessing
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2021 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -20,22 +20,13 @@ along with GCC; see the file COPYING3.  If not see
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
-#include "tm.h"
-#include "hash-set.h"
-#include "machmode.h"
-#include "vec.h"
-#include "double-int.h"
-#include "input.h"
-#include "alias.h"
-#include "symtab.h"
-#include "wide-int.h"
-#include "inchash.h"
+#include "memmodel.h"
+#include "target.h"
 #include "tree.h"
 #include "version.h"
 #include "flags.h"
-#include "cpp-id-data.h"
+#include "cpplib.h"
 #include "cppbuiltin.h"
-#include "target.h"
 
 
 /* Parse a BASEVER version string of the format "major.minor.patchlevel"
@@ -102,6 +93,12 @@ define_builtin_macros_for_compilation_flags (cpp_reader *pfile)
   if (flag_sanitize & SANITIZE_ADDRESS)
     cpp_define (pfile, "__SANITIZE_ADDRESS__");
 
+  if (flag_sanitize & SANITIZE_HWADDRESS)
+    cpp_define (pfile, "__SANITIZE_HWADDRESS__");
+
+  if (flag_sanitize & SANITIZE_THREAD)
+    cpp_define (pfile, "__SANITIZE_THREAD__");
+
   if (optimize_size)
     cpp_define (pfile, "__OPTIMIZE_SIZE__");
   if (optimize)
@@ -116,11 +113,6 @@ define_builtin_macros_for_compilation_flags (cpp_reader *pfile)
 
   cpp_define_formatted (pfile, "__FINITE_MATH_ONLY__=%d",
                        flag_finite_math_only);
-  if (flag_cilkplus)
-    cpp_define (pfile, "__cilk=200");
-
-  if (flag_check_pointer_bounds)
-    cpp_define (pfile, "__CHKP__");
 }
 
 
@@ -143,7 +135,7 @@ static void
 define_builtin_macros_for_type_sizes (cpp_reader *pfile)
 {
 #define define_type_sizeof(NAME, TYPE)                             \
-    cpp_define_formatted (pfile, NAME"="HOST_WIDE_INT_PRINT_DEC,   \
+    cpp_define_formatted (pfile, NAME"=" HOST_WIDE_INT_PRINT_DEC,   \
                           tree_to_uhwi (TYPE_SIZE_UNIT (TYPE)))
 
   define_type_sizeof ("__SIZEOF_INT__", integer_type_node);