From 0ed83e1d03b4864b5f50b6a8735ed8e3a3635193 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 4 May 2021 15:26:58 -0600 Subject: [PATCH] libcc1: use static_assert This changes one spot in libcc1 to use static_assert rather than the old-style array declaration. libcc1 * libcp1plugin.cc: Use static assert. --- libcc1/libcp1plugin.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libcc1/libcp1plugin.cc b/libcc1/libcp1plugin.cc index 3cbad5c6f02..ba6c5ef2efc 100644 --- a/libcc1/libcp1plugin.cc +++ b/libcc1/libcp1plugin.cc @@ -82,8 +82,8 @@ int plugin_is_GPL_compatible; -static int ATTRIBUTE_UNUSED -check_symbol_mask[GCC_CP_SYMBOL_MASK >= GCC_CP_SYMBOL_END ? 1 : -1]; +static_assert (GCC_CP_SYMBOL_MASK >= GCC_CP_SYMBOL_END, + "GCC_CP_SYMBOL_MASK >= GCC_CP_SYMBOL_END"); // This is put into the lang hooks when the plugin starts.