[PATCH] Replace gdb_static_assert with static_assert
Tue Dec 5 16:29:00 GMT 2017
Simon Marchi <firstname.lastname@example.org> writes:
> * common/gdb_assert.h: Remove.
* common/gdb_assert.h (gdb_static_assert): Remove.
because you don't remove this file.
> -/* 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]
Did you consider define gdb_static_assert as static_assert ((expr), "")?
You don't have to change anywhere else. Additionally, one day we move
to c++17, we can replace gdb_static_assert with static_assert globally.
More information about the Gdb-patches