diff options
author | Marek Polacek <polacek@redhat.com> | 2017-03-20 13:31:28 +0000 |
---|---|---|
committer | Marek Polacek <polacek@redhat.com> | 2017-03-20 13:31:28 +0000 |
commit | 1c9721651c04d6e9e04d0c54d4632ad884980ce4 (patch) | |
tree | e41d2e9ebb458f0d0850bf0c73e25755e1e56a6a | |
parent | 0b725f05a09fd0ef26d01954eb0d06fcb2a1db4c (diff) |
PR sanitizer/80063
* asan.c (DEF_SANITIZER_BUILTIN): Use do { } while (0).
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@246278 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/asan.c | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f8b56a2807f..90c85563214 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-03-20 Marek Polacek <polacek@redhat.com> + + PR sanitizer/80063 + * asan.c (DEF_SANITIZER_BUILTIN): Use do { } while (0). + 2017-03-20 Richard Biener <rguenther@suse.de> PR tree-optimization/80113 diff --git a/gcc/asan.c b/gcc/asan.c index edcc6ea5a91..a13679d030f 100644 --- a/gcc/asan.c +++ b/gcc/asan.c @@ -2567,10 +2567,12 @@ initialize_sanitizer_builtins (void) #define DEF_BUILTIN_STUB(ENUM, NAME) #undef DEF_SANITIZER_BUILTIN #define DEF_SANITIZER_BUILTIN(ENUM, NAME, TYPE, ATTRS) \ - decl = add_builtin_function ("__builtin_" NAME, TYPE, ENUM, \ - BUILT_IN_NORMAL, NAME, NULL_TREE); \ - set_call_expr_flags (decl, ATTRS); \ - set_builtin_decl (ENUM, decl, true); + do { \ + decl = add_builtin_function ("__builtin_" NAME, TYPE, ENUM, \ + BUILT_IN_NORMAL, NAME, NULL_TREE); \ + set_call_expr_flags (decl, ATTRS); \ + set_builtin_decl (ENUM, decl, true); \ + } while (0); #include "sanitizer.def" |