Since -fconcepts no longer implies -fconcepts-ts, we shouldn't advertise TS
support with __cpp_concepts=201507L. Also fix one case where -std=c++14
-fconcepts wasn't working (as found by range-v3 calendar). Fixing other
cases is not a priority, probably better to reject that flag combination if
there are further issues.
gcc/c-family/ChangeLog:
* c-cppbuiltin.cc (c_cpp_builtins): Adjust __cpp_concepts.
gcc/cp/ChangeLog:
* parser.cc (cp_parser_simple_type_specifier): Handle -std=c++14
-fconcepts.
}
if (flag_concepts)
{
- if (cxx_dialect >= cxx20)
+ if (cxx_dialect >= cxx20 || !flag_concepts_ts)
cpp_define (pfile, "__cpp_concepts=202002L");
else
cpp_define (pfile, "__cpp_concepts=201507L");
/* Otherwise, look for a type-name. */
if (!type)
{
- if (cxx_dialect >= cxx17)
+ if (cxx_dialect >= cxx17 || flag_concepts)
cp_parser_parse_tentatively (parser);
type = cp_parser_type_name (parser, (qualified_p && typename_p));
- if (cxx_dialect >= cxx17 && !cp_parser_parse_definitely (parser))
+ if ((cxx_dialect >= cxx17 || flag_concepts)
+ && !cp_parser_parse_definitely (parser))
type = NULL_TREE;
}