Remove semicolon after do {} while (0) in DEF_SANITIZER_BUILTIN
2017-11-05 Tom de Vries <tom@codesourcery.com> PR other/82784 * asan.c (DEF_SANITIZER_BUILTIN_1): Factor out of ... (DEF_SANITIZER_BUILTIN): ... here. (initialize_sanitizer_builtins): Use DEF_SANITIZER_BUILTIN_1 instead of DEF_SANITIZER_BUILTIN in if stmt. Add missing semicolon. From-SVN: r254425
This commit is contained in:
parent
c830c7d5c7
commit
67c6769bc0
@ -1,3 +1,11 @@
|
|||||||
|
2017-11-05 Tom de Vries <tom@codesourcery.com>
|
||||||
|
|
||||||
|
PR other/82784
|
||||||
|
* asan.c (DEF_SANITIZER_BUILTIN_1): Factor out of ...
|
||||||
|
(DEF_SANITIZER_BUILTIN): ... here.
|
||||||
|
(initialize_sanitizer_builtins): Use DEF_SANITIZER_BUILTIN_1 instead of
|
||||||
|
DEF_SANITIZER_BUILTIN in if stmt. Add missing semicolon.
|
||||||
|
|
||||||
2017-11-05 Tom de Vries <tom@codesourcery.com>
|
2017-11-05 Tom de Vries <tom@codesourcery.com>
|
||||||
|
|
||||||
PR other/82784
|
PR other/82784
|
||||||
|
14
gcc/asan.c
14
gcc/asan.c
@ -2805,14 +2805,17 @@ initialize_sanitizer_builtins (void)
|
|||||||
#define ATTR_PURE_NOTHROW_LEAF_LIST ECF_PURE | ATTR_NOTHROW_LEAF_LIST
|
#define ATTR_PURE_NOTHROW_LEAF_LIST ECF_PURE | ATTR_NOTHROW_LEAF_LIST
|
||||||
#undef DEF_BUILTIN_STUB
|
#undef DEF_BUILTIN_STUB
|
||||||
#define DEF_BUILTIN_STUB(ENUM, NAME)
|
#define DEF_BUILTIN_STUB(ENUM, NAME)
|
||||||
#undef DEF_SANITIZER_BUILTIN
|
#undef DEF_SANITIZER_BUILTIN_1
|
||||||
#define DEF_SANITIZER_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
|
#define DEF_SANITIZER_BUILTIN_1(ENUM, NAME, TYPE, ATTRS) \
|
||||||
do { \
|
do { \
|
||||||
decl = add_builtin_function ("__builtin_" NAME, TYPE, ENUM, \
|
decl = add_builtin_function ("__builtin_" NAME, TYPE, ENUM, \
|
||||||
BUILT_IN_NORMAL, NAME, NULL_TREE); \
|
BUILT_IN_NORMAL, NAME, NULL_TREE); \
|
||||||
set_call_expr_flags (decl, ATTRS); \
|
set_call_expr_flags (decl, ATTRS); \
|
||||||
set_builtin_decl (ENUM, decl, true); \
|
set_builtin_decl (ENUM, decl, true); \
|
||||||
} while (0);
|
} while (0)
|
||||||
|
#undef DEF_SANITIZER_BUILTIN
|
||||||
|
#define DEF_SANITIZER_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
|
||||||
|
DEF_SANITIZER_BUILTIN_1 (ENUM, NAME, TYPE, ATTRS);
|
||||||
|
|
||||||
#include "sanitizer.def"
|
#include "sanitizer.def"
|
||||||
|
|
||||||
@ -2821,10 +2824,11 @@ initialize_sanitizer_builtins (void)
|
|||||||
DEF_SANITIZER_BUILTIN here only as a convenience macro. */
|
DEF_SANITIZER_BUILTIN here only as a convenience macro. */
|
||||||
if ((flag_sanitize & SANITIZE_OBJECT_SIZE)
|
if ((flag_sanitize & SANITIZE_OBJECT_SIZE)
|
||||||
&& !builtin_decl_implicit_p (BUILT_IN_OBJECT_SIZE))
|
&& !builtin_decl_implicit_p (BUILT_IN_OBJECT_SIZE))
|
||||||
DEF_SANITIZER_BUILTIN (BUILT_IN_OBJECT_SIZE, "object_size",
|
DEF_SANITIZER_BUILTIN_1 (BUILT_IN_OBJECT_SIZE, "object_size",
|
||||||
BT_FN_SIZE_CONST_PTR_INT,
|
BT_FN_SIZE_CONST_PTR_INT,
|
||||||
ATTR_PURE_NOTHROW_LEAF_LIST)
|
ATTR_PURE_NOTHROW_LEAF_LIST);
|
||||||
|
|
||||||
|
#undef DEF_SANITIZER_BUILTIN_1
|
||||||
#undef DEF_SANITIZER_BUILTIN
|
#undef DEF_SANITIZER_BUILTIN
|
||||||
#undef DEF_BUILTIN_STUB
|
#undef DEF_BUILTIN_STUB
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user