diff options
Diffstat (limited to 'libcpp/expr.c')
-rw-r--r-- | libcpp/expr.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libcpp/expr.c b/libcpp/expr.c index fe9f6b0..b26fe25 100644 --- a/libcpp/expr.c +++ b/libcpp/expr.c @@ -280,9 +280,10 @@ interpret_float_suffix (cpp_reader *pfile, const uchar *s, size_t len) 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; } @@ -345,9 +346,8 @@ interpret_int_suffix (cpp_reader *pfile, const uchar *s, size_t len) 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; } |