diff options
author | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-21 20:20:42 +0000 |
---|---|---|
committer | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-21 20:20:42 +0000 |
commit | 3ff4192e6b897dcaed11375fad4d9fef665c18d5 (patch) | |
tree | 920b782aa6e41b3fdaabc0fbd131ba1beed5f318 /gcc/cppbuiltin.c | |
parent | 5ab1f49e69f8478b3a867d6e21378b42ee4e5f2e (diff) | |
download | gcc-3ff4192e6b897dcaed11375fad4d9fef665c18d5.tar.gz |
Define __SANITIZE_ADDRESS__ for -fsanitize=address
PR c/55397
* cppbuiltin.c (define_builtin_macros_for_compilation_flags):
Define __SANITIZE_ADDRESS__ for flag_asan.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193704 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppbuiltin.c')
-rw-r--r-- | gcc/cppbuiltin.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cppbuiltin.c b/gcc/cppbuiltin.c index 05d82f5df49..c3ca21a63af 100644 --- a/gcc/cppbuiltin.c +++ b/gcc/cppbuiltin.c @@ -91,6 +91,9 @@ define_builtin_macros_for_compilation_flags (cpp_reader *pfile) cpp_define_formatted (pfile, "__PIE__=%d", flag_pie); } + if (flag_asan) + cpp_define (pfile, "__SANITIZE_ADDRESS__"); + if (optimize_size) cpp_define (pfile, "__OPTIMIZE_SIZE__"); if (optimize) |