]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
fix single argument static_assert
authorMarc Poulhiès <poulhies@adacore.com>
Thu, 22 Aug 2024 10:46:18 +0000 (12:46 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Thu, 22 Aug 2024 11:41:40 +0000 (13:41 +0200)
Single argument static_assert is C++17 only.

libcpp/ChangeLog:

* lex.cc(search_line_ssse3): fix static_assert to use 2 arguments.

libcpp/lex.cc

index daf2c770bc3f4114fed9361918bd4b4911db4419..f2d47d112b921763c2a7a1ff38e7ac2192601f9b 100644 (file)
@@ -355,7 +355,8 @@ search_line_ssse3 (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
   /* Helper vector for pshufb-based matching:
      each character C we're searching for is at position (C % 16).  */
   v16qi lut = { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, '\n', 0, '\\', '\r', 0, '?' };
-  static_assert ('\n' == 10 && '\r' == 13 && '\\' == 92 && '?' == 63);
+  static_assert('\n' == 10 && '\r' == 13 && '\\' == 92 && '?' == 63,
+                "host character encoding is ASCII");
 
   v16qi d1, d2, t1, t2;
   /* Unaligned loads.  Reading beyond the final newline is safe,