aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcov.cc
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2024-05-31 08:54:00 -0400
committerMarek Polacek <polacek@redhat.com>2024-07-10 15:38:48 -0400
commitf0fb6b6acd805cfd3197eaf78d5404fa45759727 (patch)
treed4c1002b3f5535a2d4640b6e5d96a6c6638f8827 /gcc/gcov.cc
parent0c27eade4754c13a54e265e4305182c95be1e441 (diff)
downloadgcc-f0fb6b6acd805cfd3197eaf78d5404fa45759727.zip
gcc-f0fb6b6acd805cfd3197eaf78d5404fa45759727.tar.gz
gcc-f0fb6b6acd805cfd3197eaf78d5404fa45759727.tar.bz2
c++: remove Concepts TS code
In GCC 14 we deprecated Concepts TS and discussed removing the code in GCC 15. This patch removes Concepts TS code from the front end, including support for template-introductions, as in: template<typename T> concept C = true; C{T} void foo (T); // write template<C T> void foo (T); The biggest part of this patch is adjusting the testsuite. We don't want to lose coverage so I've converted most of -fconcepts-ts tests to C++20. That means they no longer have to be c++17_only. Mostly this meant turning "concept bool" into "concept" and turning function concepts into C++20 concepts. I've added missing "auto"s where required, but "auto"s in template-argument-lists are not supported anymore so I've removed some of the tests; some of them are still present to verify we don't crash on such autos. I've also added () around "requires" expressions. I plan to add a porting_to.html entry with a few hints. I've rebased and tested the patch after the recent r15-1103. gcc/c-family/ChangeLog: * c-cppbuiltin.cc (c_cpp_builtins): Remove flag_concepts_ts code. * c-opts.cc (c_common_post_options): Likewise. * c.opt: Remove -fconcepts-ts. * c.opt.urls: Regenerate. gcc/cp/ChangeLog: * constraint.cc (deduce_concept_introduction, get_deduced_wildcard, get_introduction_prototype, introduce_type_template_parameter, introduce_template_template_parameter, introduce_nontype_template_parameter, build_introduced_template_parameter, introduce_template_parameter, introduce_template_parameter_pack, introduce_template_parameter, introduce_template_parameters, process_introduction_parms, check_introduction_list, finish_template_introduction): Remove. (finish_shorthand_constraint): Remove a Concepts TS comment. * cp-tree.h (check_auto_in_tmpl_args, finish_template_introduction): Remove. * decl.cc (function_requirements_equivalent_p): Remove pre-C++20 code. (grokfndecl): Don't check flag_concepts_ts. (grokvardecl): Don't check that concept have type bool. * parser.cc (cp_parser_decl_specifier_seq): Don't check flag_concepts_ts. (cp_parser_introduction_list): Remove. (cp_parser_template_id): Remove dead code. (cp_parser_simple_type_specifier): Don't check flag_concepts_ts. (cp_parser_placeholder_type_specifier): Require require auto or decltype(auto) even pre-C++20. Don't check flag_concepts_ts. (cp_parser_type_id_1): Don't check flag_concepts_ts. (cp_parser_template_type_arg): Likewise. (cp_parser_requires_clause_opt): Remove flag_concepts_ts code. (cp_parser_compound_requirement): Don't check flag_concepts_ts. (cp_parser_template_introduction): Remove. (cp_parser_template_declaration_after_export): Don't call cp_parser_template_introduction. * pt.cc (template_heads_equivalent_p): Remove pre-C++20 code. (find_parameter_pack_data): Remove type_pack_expansion_p. (find_parameter_packs_r): Remove flag_concepts_ts code. Remove type_pack_expansion_p code. (uses_parameter_packs): Remove type_pack_expansion_p code. (make_pack_expansion): Likewise. (check_for_bare_parameter_packs): Likewise. (fixed_parameter_pack_p): Likewise. (tsubst_qualified_id): Remove dead code. (extract_autos_r): Remove. (extract_autos): Remove. (do_auto_deduction): Remove flag_concepts_ts code. (type_uses_auto): Likewise. (check_auto_in_tmpl_args): Remove. gcc/ChangeLog: * doc/invoke.texi: Mention that -fconcepts-ts was removed. libstdc++-v3/ChangeLog: * testsuite/std/ranges/access/101782.cc: Don't compile with -fconcepts-ts. gcc/testsuite/ChangeLog: * g++.dg/concepts/auto3.C: Compile with -fconcepts. Run in C++17 and up. Add dg-error. * g++.dg/concepts/auto5.C: Likewise. * g++.dg/concepts/auto7.C: Compile with -fconcepts. Add dg-error. * g++.dg/concepts/auto8a.C: Compile with -fconcepts. * g++.dg/concepts/class-deduction1.C: Compile with -fconcepts. Run in C++17 and up. Convert to C++20. * g++.dg/concepts/class5.C: Likewise. * g++.dg/concepts/class6.C: Likewise. * g++.dg/concepts/debug1.C: Likewise. * g++.dg/concepts/decl-diagnose.C: Compile with -fconcepts. Run in C++17 and up. Add dg-error. * g++.dg/concepts/deduction-constraint1.C: Compile with -fconcepts. Run in C++17 and up. Convert to C++20. * g++.dg/concepts/diagnostic1.C: Likewise. * g++.dg/concepts/dr1430.C: Likewise. * g++.dg/concepts/equiv.C: Likewise. * g++.dg/concepts/equiv2.C: Likewise. * g++.dg/concepts/expression.C: Likewise. * g++.dg/concepts/expression2.C: Likewise. * g++.dg/concepts/expression3.C: Likewise. * g++.dg/concepts/fn-concept2.C: Compile with -fconcepts. Run in C++17 and up. Remove code. Add dg-prune-output. * g++.dg/concepts/fn-concept3.C: Compile with -fconcepts. Run in C++17 and up. Convert to C++20. * g++.dg/concepts/fn1.C: Likewise. * g++.dg/concepts/fn10.C: Likewise. * g++.dg/concepts/fn2.C: Likewise. * g++.dg/concepts/fn3.C: Likewise. * g++.dg/concepts/fn4.C: Likewise. * g++.dg/concepts/fn5.C: Likewise. * g++.dg/concepts/fn6.C: Likewise. * g++.dg/concepts/fn7.C: Compile with -fconcepts. Add dg-error. * g++.dg/concepts/fn8.C: Compile with -fconcepts. Run in C++17 and up. Convert to C++20. * g++.dg/concepts/fn9.C: Likewise. * g++.dg/concepts/generic-fn-err.C: Likewise. * g++.dg/concepts/generic-fn.C: Likewise. * g++.dg/concepts/inherit-ctor1.C: Likewise. * g++.dg/concepts/inherit-ctor3.C: Likewise. * g++.dg/concepts/intro1.C: Likewise. * g++.dg/concepts/locations1.C: Compile with -fconcepts. Run in C++17 and up. Add dg-prune-output. * g++.dg/concepts/partial-concept-id1.C: Compile with -fconcepts. Run in C++17 and up. Convert to C++20. * g++.dg/concepts/partial-concept-id2.C: Likewise. * g++.dg/concepts/partial-spec5.C: Likewise. * g++.dg/concepts/placeholder2.C: Likewise. * g++.dg/concepts/placeholder3.C: Likewise. * g++.dg/concepts/placeholder4.C: Likewise. * g++.dg/concepts/placeholder5.C: Likewise. * g++.dg/concepts/placeholder6.C: Likewise. * g++.dg/concepts/pr65634.C: Likewise. * g++.dg/concepts/pr65636.C: Likewise. * g++.dg/concepts/pr65681.C: Likewise. * g++.dg/concepts/pr65848.C: Likewise. * g++.dg/concepts/pr67249.C: Likewise. * g++.dg/concepts/pr67595.C: Likewise. * g++.dg/concepts/pr68434.C: Likewise. * g++.dg/concepts/pr71127.C: Likewise. * g++.dg/concepts/pr71128.C: Compile with -fconcepts. Run in C++17 and up. Add dg-error. * g++.dg/concepts/pr71131.C: Compile with -fconcepts. Run in C++17 and up. Convert to C++20. * g++.dg/concepts/pr71385.C: Likewise. * g++.dg/concepts/pr85065.C: Likewise. * g++.dg/concepts/pr92804-2.C: Compile with -fconcepts. Convert to C++20. * g++.dg/concepts/template-parm11.C: Compile with -fconcepts. Run in C++17 and up. Convert to C++20. * g++.dg/concepts/template-parm12.C: Likewise. * g++.dg/concepts/template-parm2.C: Likewise. * g++.dg/concepts/template-parm3.C: Likewise. * g++.dg/concepts/template-parm4.C: Likewise. * g++.dg/concepts/template-template-parm1.C: Likewise. * g++.dg/concepts/var-concept1.C: Likewise. * g++.dg/concepts/var-concept2.C: Likewise. * g++.dg/concepts/var-concept3.C: Likewise. * g++.dg/concepts/var-concept4.C: Likewise. * g++.dg/concepts/var-concept5.C: Likewise. * g++.dg/concepts/var-concept6.C: Likewise. * g++.dg/concepts/var-concept7.C: Likewise. * g++.dg/concepts/var-templ1.C: Run in C++17 and up. * g++.dg/concepts/var-templ2.C: Compile with -fconcepts. Run in C++17 and up. Convert to C++20. * g++.dg/concepts/var-templ3.C: Likewise. * g++.dg/concepts/variadic1.C: Likewise. * g++.dg/concepts/variadic2.C: Likewise. * g++.dg/concepts/variadic3.C: Likewise. * g++.dg/concepts/variadic4.C: Likewise. * g++.dg/cpp2a/concepts-pr65575.C: Likewise. * g++.dg/cpp2a/concepts-pr66091.C: Likewise. * g++.dg/cpp2a/concepts-pr67148.C: Compile with -fconcepts. Convert to C++20. * g++.dg/cpp2a/concepts-pr67225-1.C: Likewise. * g++.dg/cpp2a/concepts-pr67225-2.C: Likewise. * g++.dg/cpp2a/concepts-pr67225-3.C: Likewise. * g++.dg/cpp2a/concepts-pr67225-4.C: Likewise. * g++.dg/cpp2a/concepts-pr67225-5.C: Likewise. * g++.dg/cpp2a/concepts-pr67319.C: Likewise. * g++.dg/cpp2a/concepts-pr67427.C: Likewise. * g++.dg/cpp2a/concepts-pr67654.C: Likewise. * g++.dg/cpp2a/concepts-pr67658.C: Likewise. * g++.dg/cpp2a/concepts-pr67684.C: Likewise. * g++.dg/cpp2a/concepts-pr67697.C: Likewise. * g++.dg/cpp2a/concepts-pr67719.C: Likewise. * g++.dg/cpp2a/concepts-pr67774.C: Likewise. * g++.dg/cpp2a/concepts-pr67825.C: Likewise. * g++.dg/cpp2a/concepts-pr67860.C: Likewise. * g++.dg/cpp2a/concepts-pr67862.C: Likewise. * g++.dg/cpp2a/concepts-pr67969.C: Likewise. * g++.dg/cpp2a/concepts-pr68093-2.C: Likewise. * g++.dg/cpp2a/concepts-pr68372.C: Likewise. * g++.dg/cpp2a/concepts-pr68812.C: Likewise. * g++.dg/cpp2a/concepts-pr69235.C: Likewise. * g++.dg/cpp2a/concepts-pr78752-2.C: Likewise. * g++.dg/cpp2a/concepts-pr78752.C: Likewise. * g++.dg/cpp2a/concepts-pr79759.C: Likewise. * g++.dg/cpp2a/concepts-pr80746.C: Likewise. * g++.dg/cpp2a/concepts-pr80773.C: Likewise. * g++.dg/cpp2a/concepts-pr82507.C: Likewise. * g++.dg/cpp2a/concepts-pr82740.C: Likewise. * g++.dg/cpp2a/concepts-pr84980.C: Compile with -fconcepts. Run in C++17 and up. Convert to C++20. * g++.dg/cpp2a/concepts-pr85265.C: Likewise. * g++.dg/cpp2a/concepts-pr85808.C: Compile with -fconcepts. Convert to C++20. * g++.dg/cpp2a/concepts-pr86269.C: Likewise. * g++.dg/cpp2a/concepts-pr87441.C: Likewise. * g++.dg/cpp2a/concepts-requires5.C: Compile with -fconcepts. Adjust dg-error. Add same_as. * g++.dg/cpp2a/nontype-class50a.C: Compile with -fconcepts. * g++.dg/concepts/auto1.C: Removed. * g++.dg/concepts/auto4.C: Removed. * g++.dg/concepts/auto6.C: Removed. * g++.dg/concepts/fn-concept1.C: Removed. * g++.dg/concepts/intro2.C: Removed. * g++.dg/concepts/intro3.C: Removed. * g++.dg/concepts/intro4.C: Removed. * g++.dg/concepts/intro5.C: Removed. * g++.dg/concepts/intro6.C: Removed. * g++.dg/concepts/intro7.C: Removed. * g++.dg/cpp2a/concepts-ts1.C: Removed. * g++.dg/cpp2a/concepts-ts2.C: Removed. * g++.dg/cpp2a/concepts-ts3.C: Removed. * g++.dg/cpp2a/concepts-ts4.C: Removed. * g++.dg/cpp2a/concepts-ts5.C: Removed. * g++.dg/cpp2a/concepts-ts6.C: Removed.
Diffstat (limited to 'gcc/gcov.cc')
0 files changed, 0 insertions, 0 deletions