aboutsummaryrefslogtreecommitdiff
path: root/libcpp/lex.c
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2021-11-22 11:29:40 -0500
committerMarek Polacek <polacek@redhat.com>2021-11-22 21:43:38 -0500
commit630686f93f0018fa1ef128aa673fddd302cc83e1 (patch)
tree26e9d26bbbc8b103e2c8199ce6d818d3f90bae7d /libcpp/lex.c
parente888bea2384a0d8d29a6545c4f57f41cb49df0a6 (diff)
downloadgcc-630686f93f0018fa1ef128aa673fddd302cc83e1.zip
gcc-630686f93f0018fa1ef128aa673fddd302cc83e1.tar.gz
gcc-630686f93f0018fa1ef128aa673fddd302cc83e1.tar.bz2
libcpp: Use [[likely]] conditionally
Let's hide [[likely]] behind a macro, to suppress warnings if the compiler doesn't support it. Co-authored-by: Jonathan Wakely <jwakely@redhat.com> PR preprocessor/103355 libcpp/ChangeLog: * lex.c: Use ATTR_LIKELY instead of [[likely]]. * system.h (ATTR_LIKELY): Define.
Diffstat (limited to 'libcpp/lex.c')
-rw-r--r--libcpp/lex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcpp/lex.c b/libcpp/lex.c
index 94c36f0..9c27d8b 100644
--- a/libcpp/lex.c
+++ b/libcpp/lex.c
@@ -1286,7 +1286,7 @@ namespace bidi {
case kind::RTL:
/* These aren't popped by a PDF/PDI. */
break;
- [[likely]] case kind::NONE:
+ ATTR_LIKELY case kind::NONE:
break;
default:
abort ();