Redefine gdb_static_assert as static_assert
authorSimon Marchi <simon.marchi@ericsson.com>
Tue, 5 Dec 2017 21:15:08 +0000 (16:15 -0500)
committerSimon Marchi <simon.marchi@ericsson.com>
Tue, 5 Dec 2017 21:15:09 +0000 (16:15 -0500)
commited9376bd95c52ba00aa37b224b4407030a00d184
tree5acd5e21570cf8fdc27b6c34734b4ca6aeea0ca4
parent798a7429f980a00844c22dfdda9475c451c635d4
Redefine gdb_static_assert as static_assert

Since we use C++11, we can use static_assert instead doing the trick
that makes a negative-sized array if the expression is false.
static_assert is built in the language and gives clearer error messages.

To avoid modifying the usages of gdb_static_assert, redefine
gdb_static_assert in terms of static_assert, passing an empty message.
If we want to add an assert with a message, it's always possible to use
static_assert directly.

gdb/ChangeLog:

* common/gdb_assert.h (gdb_static_assert): Redefine using
static_assert.
gdb/ChangeLog
gdb/common/gdb_assert.h