+2017-12-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/79228
+ * expr.c (interpret_float_suffix): Avoid memcmp.
+ (interpret_int_suffix): Likewise. Don't check for if.
+
2017-12-01 Jason Merrill <jason@redhat.com>
PR c++/79228 - extensions hide C++14 complex literal operators
them as user-defined literals. */
if (CPP_OPTION (pfile, cplusplus)
&& CPP_OPTION (pfile, lang) > CLK_CXX11
- && (!memcmp (orig_s, "i", orig_len)
- || !memcmp (orig_s, "if", orig_len)
- || !memcmp (orig_s, "il", orig_len)))
+ && orig_s[0] == 'i'
+ && (orig_len == 1
+ || (orig_len == 2
+ && (orig_s[1] == 'f' || orig_s[1] == 'l'))))
return 0;
}
them as user-defined literals. */
if (CPP_OPTION (pfile, cplusplus)
&& CPP_OPTION (pfile, lang) > CLK_CXX11
- && (!memcmp (s, "i", orig_len)
- || !memcmp (s, "if", orig_len)
- || !memcmp (s, "il", orig_len)))
+ && s[0] == 'i'
+ && (orig_len == 1 || (orig_len == 2 && s[1] == 'l')))
return 0;
}