From: Tom Tromey Date: Tue, 4 May 2021 21:26:58 +0000 (-0600) Subject: libcc1: use static_assert X-Git-Tag: basepoints/gcc-13~7847 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ed83e1d03b4864b5f50b6a8735ed8e3a3635193;p=thirdparty%2Fgcc.git 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. --- diff --git a/libcc1/libcp1plugin.cc b/libcc1/libcp1plugin.cc index 3cbad5c6f021..ba6c5ef2efce 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.