re PR c++/79228 ('i' suffix for __complex__ extension interferes with C++14 UDLs for std::complex)
PR c++/79228 * expr.c (interpret_float_suffix): Avoid memcmp. (interpret_int_suffix): Likewise. Don't check for if. From-SVN: r255434
This commit is contained in:
parent
186d43a78e
commit
a7b1ce0405
|
@ -1,3 +1,9 @@
|
||||||
|
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>
|
2017-12-01 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
PR c++/79228 - extensions hide C++14 complex literal operators
|
PR c++/79228 - extensions hide C++14 complex literal operators
|
||||||
|
|
|
@ -280,9 +280,10 @@ interpret_float_suffix (cpp_reader *pfile, const uchar *s, size_t len)
|
||||||
them as user-defined literals. */
|
them as user-defined literals. */
|
||||||
if (CPP_OPTION (pfile, cplusplus)
|
if (CPP_OPTION (pfile, cplusplus)
|
||||||
&& CPP_OPTION (pfile, lang) > CLK_CXX11
|
&& CPP_OPTION (pfile, lang) > CLK_CXX11
|
||||||
&& (!memcmp (orig_s, "i", orig_len)
|
&& orig_s[0] == 'i'
|
||||||
|| !memcmp (orig_s, "if", orig_len)
|
&& (orig_len == 1
|
||||||
|| !memcmp (orig_s, "il", orig_len)))
|
|| (orig_len == 2
|
||||||
|
&& (orig_s[1] == 'f' || orig_s[1] == 'l'))))
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -345,9 +346,8 @@ interpret_int_suffix (cpp_reader *pfile, const uchar *s, size_t len)
|
||||||
them as user-defined literals. */
|
them as user-defined literals. */
|
||||||
if (CPP_OPTION (pfile, cplusplus)
|
if (CPP_OPTION (pfile, cplusplus)
|
||||||
&& CPP_OPTION (pfile, lang) > CLK_CXX11
|
&& CPP_OPTION (pfile, lang) > CLK_CXX11
|
||||||
&& (!memcmp (s, "i", orig_len)
|
&& s[0] == 'i'
|
||||||
|| !memcmp (s, "if", orig_len)
|
&& (orig_len == 1 || (orig_len == 2 && s[1] == 'l')))
|
||||||
|| !memcmp (s, "il", orig_len)))
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue