diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 524eef3f5e..ef0c4bdf46 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2017-12-05 Simon Marchi + + * common/gdb_assert.h (gdb_static_assert): Redefine using + static_assert. + 2017-12-05 Simon Marchi * ada-lang.c (ada_collect_symbol_completion_matches): Remove diff --git a/gdb/common/gdb_assert.h b/gdb/common/gdb_assert.h index 5de9d3f670..20825c82b0 100644 --- a/gdb/common/gdb_assert.h +++ b/gdb/common/gdb_assert.h @@ -22,8 +22,7 @@ /* A static assertion. This will cause a compile-time error if EXPR, which must be a compile-time constant, is false. */ -#define gdb_static_assert(expr) \ - extern int never_defined_just_used_for_checking[(expr) ? 1 : -1] +#define gdb_static_assert(expr) static_assert (expr, "") /* PRAGMATICS: "gdb_assert.h":gdb_assert() is a lower case (rather than upper case) macro since that provides the closest fit to the