This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Redefine gdb_static_assert as static_assert


*** TEST RESULTS FOR COMMIT ed9376bd95c52ba00aa37b224b4407030a00d184 ***

Author: Simon Marchi <simon.marchi@ericsson.com>
Branch: master
Commit: ed9376bd95c52ba00aa37b224b4407030a00d184

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]