summaryrefslogtreecommitdiff
path: root/libcc1
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-05-04 15:26:58 -0600
committerTom Tromey <tom@tromey.com>2021-05-05 00:06:17 -0600
commit0ed83e1d03b4864b5f50b6a8735ed8e3a3635193 (patch)
treefbbecf2c11505725afc0c9af42b42567fb3f8602 /libcc1
parent7c4e5d5eaad59ac4d9cf06934c953537b0b1a367 (diff)
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.
Diffstat (limited to 'libcc1')
-rw-r--r--libcc1/libcp1plugin.cc4
1 files 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.