projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c4e5d5
)
libcc1: use static_assert
author
Tom Tromey
<tom@tromey.com>
Tue, 4 May 2021 21:26:58 +0000
(15:26 -0600)
committer
Tom Tromey
<tom@tromey.com>
Wed, 5 May 2021 06:06:17 +0000
(
00:06
-0600)
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
patch
|
blob
|
history
diff --git
a/libcc1/libcp1plugin.cc
b/libcc1/libcp1plugin.cc
index
3cbad5c
..
ba6c5ef
100644
(file)
--- a/
libcc1/libcp1plugin.cc
+++ b/
libcc1/libcp1plugin.cc
@@
-82,8
+82,8
@@
int plugin_is_GPL_compatible;
\f
-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.