From 2efa2c79ea0c2bcd8cc35dcdfe49492ba5304134 Mon Sep 17 00:00:00 2001 From: Andreas Tobler Date: Wed, 11 Jan 2012 21:51:31 +0000 Subject: [PATCH] 2012-01-11 Andreas Tobler * common/gdb_assert.h (gdb_static_assert): Rename static_assert to an internal gdb_static_assert. * mi/mi-common.c: Rename static_assert to gdb_static_assert. --- gdb/ChangeLog | 6 ++++++ gdb/common/gdb_assert.h | 2 +- gdb/mi/mi-common.c | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b58f885c3bd..2bef9ee42b8 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2012-01-11 Andreas Tobler + + * common/gdb_assert.h (gdb_static_assert): Rename static_assert to + an internal gdb_static_assert. + * mi/mi-common.c: Rename static_assert to gdb_static_assert. + 2012-01-11 Tom Tromey PR gdb/9598: diff --git a/gdb/common/gdb_assert.h b/gdb/common/gdb_assert.h index 351f55877e3..dc79a0823da 100644 --- a/gdb/common/gdb_assert.h +++ b/gdb/common/gdb_assert.h @@ -22,7 +22,7 @@ /* A static assertion. This will cause a compile-time error if EXPR, which must be a compile-time constant, is false. */ -#define static_assert(expr) \ +#define gdb_static_assert(expr) \ extern int never_defined_just_used_for_checking[(expr) ? 1 : -1] /* PRAGMATICS: "gdb_assert.h":gdb_assert() is a lower case (rather diff --git a/gdb/mi/mi-common.c b/gdb/mi/mi-common.c index 1eaa99011bd..1a3851e7298 100644 --- a/gdb/mi/mi-common.c +++ b/gdb/mi/mi-common.c @@ -43,7 +43,8 @@ static const char * const async_reason_string_lookup[] = NULL }; -static_assert (ARRAY_SIZE (async_reason_string_lookup) == EXEC_ASYNC_LAST + 1); +gdb_static_assert (ARRAY_SIZE (async_reason_string_lookup) + == EXEC_ASYNC_LAST + 1); const char * async_reason_lookup (enum async_reply_reason reason) -- 2.30.2