From: Jason Merrill Date: Tue, 8 Mar 2016 22:30:44 +0000 (-0500) Subject: Remove Concepts from -std=c++1z. X-Git-Tag: basepoints/gcc-7~523 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80aac5c82043b6f3d7b2100e1f2f9abbbad97e89;p=thirdparty%2Fgcc.git Remove Concepts from -std=c++1z. gcc/c-family/ * c-opts.c (set_std_cxx1z): Don't enable concepts. gcc/testsuite/ * lib/g++-dg.exp (g++-dg-runtest): Handle "concepts" in std list. * lib/target-supports.exp (check_effective_target_concepts): New. gcc/cp/ * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful diagnostic for use of "concept". (cp_parser_requires_clause_opt): And "requires". (cp_parser_type_parameter, cp_parser_late_return_type_opt) (cp_parser_explicit_template_declaration): Adjust. * Make-lang.in (check-c++-all): Add "concepts" to std list. From-SVN: r234069 --- diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index f285c8b62be6..464297b65391 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,7 @@ +2016-03-08 Jason Merrill + + * c-opts.c (set_std_cxx1z): Don't enable concepts. + 2016-03-04 David Malcolm PR c/68187 diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c index c2783f7e5603..fec58bcf91f4 100644 --- a/gcc/c-family/c-opts.c +++ b/gcc/c-family/c-opts.c @@ -1566,8 +1566,6 @@ set_std_cxx1z (int iso) /* C++11 includes the C99 standard library. */ flag_isoc94 = 1; flag_isoc99 = 1; - /* Enable concepts by default. */ - flag_concepts = 1; flag_isoc11 = 1; cxx_dialect = cxx1z; lang_hooks.name = "GNU C++14"; /* Pretend C++14 till standarization. */ diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 2b95036f931c..4bb43db6bf10 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,12 @@ 2016-03-08 Jason Merrill + * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful + diagnostic for use of "concept". + (cp_parser_requires_clause_opt): And "requires". + (cp_parser_type_parameter, cp_parser_late_return_type_opt) + (cp_parser_explicit_template_declaration): Adjust. + * Make-lang.in (check-c++-all): Add "concepts" to std list. + P0036R0: Unary Folds and Empty Parameter Packs * pt.c (expand_empty_fold): Remove special cases for *,+,&,|. diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in index 2286c64a8fb4..8770f6ff1bed 100644 --- a/gcc/cp/Make-lang.in +++ b/gcc/cp/Make-lang.in @@ -152,7 +152,7 @@ check-c++1z: # Run the testsuite in all standard conformance levels. check-c++-all: - $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) --stds=98,11,14,1z" check-g++ + $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) --stds=98,11,14,1z,concepts" check-g++ # Run the testsuite with garbage collection at every opportunity. check-g++-strict-gc: diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 535052f97d01..726d5fc6a82c 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -3172,6 +3172,8 @@ cp_parser_diagnose_invalid_type_name (cp_parser *parser, tree id, && !strcmp (IDENTIFIER_POINTER (id), "thread_local")) inform (location, "C++11 % only available with " "-std=c++11 or -std=gnu++11"); + else if (!flag_concepts && id == ridpointers[(int)RID_CONCEPT]) + inform (location, "% only available with -fconcepts"); else if (processing_template_decl && current_class_type && TYPE_BINFO (current_class_type)) { @@ -14668,13 +14670,10 @@ cp_parser_type_parameter (cp_parser* parser, bool *is_parameter_pack) cp_parser_require (parser, CPP_GREATER, RT_GREATER); // If template requirements are present, parse them. - if (flag_concepts) - { - tree reqs = get_shorthand_constraints (current_template_parms); - if (tree r = cp_parser_requires_clause_opt (parser)) - reqs = conjoin_constraints (reqs, make_predicate_constraint (r)); - TEMPLATE_PARMS_CONSTRAINTS (current_template_parms) = reqs; - } + tree reqs = get_shorthand_constraints (current_template_parms); + if (tree r = cp_parser_requires_clause_opt (parser)) + reqs = conjoin_constraints (reqs, make_predicate_constraint (r)); + TEMPLATE_PARMS_CONSTRAINTS (current_template_parms) = reqs; /* Look for the `class' or 'typename' keywords. */ cp_parser_type_parameter_key (parser); @@ -19745,6 +19744,8 @@ cp_parser_late_return_type_opt (cp_parser* parser, cp_declarator *declarator, /* A late-specified return type is indicated by an initial '->'. */ if (token->type != CPP_DEREF && token->keyword != RID_REQUIRES + && !(token->type == CPP_NAME + && token->u.value == ridpointers[RID_REQUIRES]) && !(declare_simd_p || cilk_simd_fn_vector_p || oacc_routine_p)) return NULL_TREE; @@ -24216,8 +24217,20 @@ cp_parser_requires_clause (cp_parser *parser) static tree cp_parser_requires_clause_opt (cp_parser *parser) { - if (!cp_lexer_next_token_is_keyword (parser->lexer, RID_REQUIRES)) - return NULL_TREE; + cp_token *tok = cp_lexer_peek_token (parser->lexer); + if (tok->keyword != RID_REQUIRES) + { + if (!flag_concepts && tok->type == CPP_NAME + && tok->u.value == ridpointers[RID_REQUIRES]) + { + error_at (cp_lexer_peek_token (parser->lexer)->location, + "% only available with -fconcepts"); + /* Parse and discard the requires-clause. */ + cp_lexer_consume_token (parser->lexer); + cp_parser_requires_clause (parser); + } + return NULL_TREE; + } cp_lexer_consume_token (parser->lexer); return cp_parser_requires_clause (parser); } @@ -25608,13 +25621,10 @@ cp_parser_explicit_template_declaration (cp_parser* parser, bool member_p) cp_parser_skip_to_end_of_template_parameter_list (parser); /* Manage template requirements */ - if (flag_concepts) - { - tree reqs = get_shorthand_constraints (current_template_parms); - if (tree r = cp_parser_requires_clause_opt (parser)) - reqs = conjoin_constraints (reqs, make_predicate_constraint (r)); - TEMPLATE_PARMS_CONSTRAINTS (current_template_parms) = reqs; - } + tree reqs = get_shorthand_constraints (current_template_parms); + if (tree r = cp_parser_requires_clause_opt (parser)) + reqs = conjoin_constraints (reqs, make_predicate_constraint (r)); + TEMPLATE_PARMS_CONSTRAINTS (current_template_parms) = reqs; cp_parser_template_declaration_after_parameters (parser, parameter_list, member_p); diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 62c70d51e064..9580c10fc451 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -2238,6 +2238,16 @@ return value even without this option. In all other cases, when exhaustion is signalled by throwing @code{std::bad_alloc}. See also @samp{new (nothrow)}. +@item -fconcepts +@opindex fconcepts +Enable support for the C++ Extensions for Concepts Technical +Specification, ISO 19217 (2015), which allows code like + +@smallexample +template concept bool Addable = requires (T t) @{ t + t; @}; +template T add (T a, T b) @{ return a + b; @} +@end smallexample + @item -fconstexpr-depth=@var{n} @opindex fconstexpr-depth Set the maximum nested evaluation depth for C++11 constexpr functions diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 51494140033f..40e9b5275caf 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-03-08 Jason Merrill + + * lib/g++-dg.exp (g++-dg-runtest): Handle "concepts" in std list. + * lib/target-supports.exp (check_effective_target_concepts): New. + 2016-03-08 Jakub Jelinek PR c++/70135 diff --git a/gcc/testsuite/g++.dg/concepts/alias1.C b/gcc/testsuite/g++.dg/concepts/alias1.C index 03b3ceae9281..fdd54bd2af15 100644 --- a/gcc/testsuite/g++.dg/concepts/alias1.C +++ b/gcc/testsuite/g++.dg/concepts/alias1.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/alias2.C b/gcc/testsuite/g++.dg/concepts/alias2.C index d81188ed4354..7879d4419617 100644 --- a/gcc/testsuite/g++.dg/concepts/alias2.C +++ b/gcc/testsuite/g++.dg/concepts/alias2.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/alias3.C b/gcc/testsuite/g++.dg/concepts/alias3.C index e6ab66976a16..a8f0f67e04f9 100644 --- a/gcc/testsuite/g++.dg/concepts/alias3.C +++ b/gcc/testsuite/g++.dg/concepts/alias3.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/alias4.C b/gcc/testsuite/g++.dg/concepts/alias4.C index 4227a44c042b..8ffa0a10e3f0 100644 --- a/gcc/testsuite/g++.dg/concepts/alias4.C +++ b/gcc/testsuite/g++.dg/concepts/alias4.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/auto1.C b/gcc/testsuite/g++.dg/concepts/auto1.C index 6068e4cc4862..be9237d69fa5 100644 --- a/gcc/testsuite/g++.dg/concepts/auto1.C +++ b/gcc/testsuite/g++.dg/concepts/auto1.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template class A { }; diff --git a/gcc/testsuite/g++.dg/concepts/auto3.C b/gcc/testsuite/g++.dg/concepts/auto3.C index 1cface77d555..e1a4d7342aa4 100644 --- a/gcc/testsuite/g++.dg/concepts/auto3.C +++ b/gcc/testsuite/g++.dg/concepts/auto3.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++1z } +// { dg-options "-std=c++1z -fconcepts" } template class tuple {}; diff --git a/gcc/testsuite/g++.dg/concepts/class.C b/gcc/testsuite/g++.dg/concepts/class.C index ea74a54da6c1..061105756cb0 100644 --- a/gcc/testsuite/g++.dg/concepts/class.C +++ b/gcc/testsuite/g++.dg/concepts/class.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool Class() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/class1.C b/gcc/testsuite/g++.dg/concepts/class1.C index b213cb58b7e3..a2c4f5d1aed8 100644 --- a/gcc/testsuite/g++.dg/concepts/class1.C +++ b/gcc/testsuite/g++.dg/concepts/class1.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/class2.C b/gcc/testsuite/g++.dg/concepts/class2.C index 2c3ea4483abc..4b8706d8001b 100644 --- a/gcc/testsuite/g++.dg/concepts/class2.C +++ b/gcc/testsuite/g++.dg/concepts/class2.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/class3.C b/gcc/testsuite/g++.dg/concepts/class3.C index e3a1d2a949b6..c25c801f1f63 100644 --- a/gcc/testsuite/g++.dg/concepts/class3.C +++ b/gcc/testsuite/g++.dg/concepts/class3.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/class4.C b/gcc/testsuite/g++.dg/concepts/class4.C index 7ba825085523..af6db2509dbf 100644 --- a/gcc/testsuite/g++.dg/concepts/class4.C +++ b/gcc/testsuite/g++.dg/concepts/class4.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool Class() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/class5.C b/gcc/testsuite/g++.dg/concepts/class5.C index 903bf2499558..218ec9f5a9f0 100644 --- a/gcc/testsuite/g++.dg/concepts/class5.C +++ b/gcc/testsuite/g++.dg/concepts/class5.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool One() { return sizeof(T) >= 4; } diff --git a/gcc/testsuite/g++.dg/concepts/class6.C b/gcc/testsuite/g++.dg/concepts/class6.C index fe6b42d5557e..4a3a3d70a85c 100644 --- a/gcc/testsuite/g++.dg/concepts/class6.C +++ b/gcc/testsuite/g++.dg/concepts/class6.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool One() { return sizeof(T) >= 4; } diff --git a/gcc/testsuite/g++.dg/concepts/constrained-parm.C b/gcc/testsuite/g++.dg/concepts/constrained-parm.C index fd21c43a037b..2650caeb9c42 100644 --- a/gcc/testsuite/g++.dg/concepts/constrained-parm.C +++ b/gcc/testsuite/g++.dg/concepts/constrained-parm.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/decl-diagnose.C b/gcc/testsuite/g++.dg/concepts/decl-diagnose.C index 67b56f962d0f..9829ba1ba697 100644 --- a/gcc/testsuite/g++.dg/concepts/decl-diagnose.C +++ b/gcc/testsuite/g++.dg/concepts/decl-diagnose.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } typedef concept int CINT; // { dg-error "'concept' cannot appear in a typedef declaration" } diff --git a/gcc/testsuite/g++.dg/concepts/deduction-constraint1.C b/gcc/testsuite/g++.dg/concepts/deduction-constraint1.C index 6ff3be94ba98..dfb0c6e94367 100644 --- a/gcc/testsuite/g++.dg/concepts/deduction-constraint1.C +++ b/gcc/testsuite/g++.dg/concepts/deduction-constraint1.C @@ -1,5 +1,5 @@ // PR c++/67007 -// { dg-options -std=c++1z } +// { dg-options "-std=c++1z -fconcepts" } template concept bool A = diff --git a/gcc/testsuite/g++.dg/concepts/diagnostic1.C b/gcc/testsuite/g++.dg/concepts/diagnostic1.C index 7c360cc3943b..aa98ffa752a4 100644 --- a/gcc/testsuite/g++.dg/concepts/diagnostic1.C +++ b/gcc/testsuite/g++.dg/concepts/diagnostic1.C @@ -1,5 +1,5 @@ // PR c++/67159 -// { dg-options -std=c++1z } +// { dg-options "-std=c++1z -fconcepts" } template concept bool R = requires (T& t) { diff --git a/gcc/testsuite/g++.dg/concepts/disjunction1.C b/gcc/testsuite/g++.dg/concepts/disjunction1.C index f67fa0beacb0..24472cc296de 100644 --- a/gcc/testsuite/g++.dg/concepts/disjunction1.C +++ b/gcc/testsuite/g++.dg/concepts/disjunction1.C @@ -1,5 +1,5 @@ // PR c++/66962 -// { dg-options -std=c++1z } +// { dg-options "-std=c++1z -fconcepts" } template struct remove_cv; template struct is_reference; diff --git a/gcc/testsuite/g++.dg/concepts/dr1430.C b/gcc/testsuite/g++.dg/concepts/dr1430.C index 7f857fe4ecc0..3a7ba0363b1a 100644 --- a/gcc/testsuite/g++.dg/concepts/dr1430.C +++ b/gcc/testsuite/g++.dg/concepts/dr1430.C @@ -1,5 +1,5 @@ // PR c++/66092 -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } #include diff --git a/gcc/testsuite/g++.dg/concepts/equiv.C b/gcc/testsuite/g++.dg/concepts/equiv.C index c2ac7410f010..11e232fe2d5e 100644 --- a/gcc/testsuite/g++.dg/concepts/equiv.C +++ b/gcc/testsuite/g++.dg/concepts/equiv.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } // Check equivalence of short- and longhand declarations. diff --git a/gcc/testsuite/g++.dg/concepts/equiv2.C b/gcc/testsuite/g++.dg/concepts/equiv2.C index 675fe2105f19..24d419b2ed3e 100644 --- a/gcc/testsuite/g++.dg/concepts/equiv2.C +++ b/gcc/testsuite/g++.dg/concepts/equiv2.C @@ -1,5 +1,5 @@ // { dg-do run } -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } // template diff --git a/gcc/testsuite/g++.dg/concepts/explicit-inst1.C b/gcc/testsuite/g++.dg/concepts/explicit-inst1.C index 3079ca50f647..89eeb156b574 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-inst1.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-inst1.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/explicit-inst2.C b/gcc/testsuite/g++.dg/concepts/explicit-inst2.C index 5e75f4ff6313..0319756bfc5c 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-inst2.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-inst2.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/explicit-inst3.C b/gcc/testsuite/g++.dg/concepts/explicit-inst3.C index a471657a750e..177fc6c1368c 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-inst3.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-inst3.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/explicit-inst4.C b/gcc/testsuite/g++.dg/concepts/explicit-inst4.C index b075c1009e8e..cf0d8988bd30 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-inst4.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-inst4.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/explicit-spec1.C b/gcc/testsuite/g++.dg/concepts/explicit-spec1.C index 6316410b950b..c6f559cd1af7 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-spec1.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-spec1.C @@ -1,5 +1,5 @@ // { dg-do run } -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } #include diff --git a/gcc/testsuite/g++.dg/concepts/explicit-spec2.C b/gcc/testsuite/g++.dg/concepts/explicit-spec2.C index 4f196243717b..8fa7e8aef166 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-spec2.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-spec2.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/explicit-spec3.C b/gcc/testsuite/g++.dg/concepts/explicit-spec3.C index 29546b3b37c4..6294cef5845e 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-spec3.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-spec3.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/explicit-spec4.C b/gcc/testsuite/g++.dg/concepts/explicit-spec4.C index e9aacd51bbba..16698cbb366a 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-spec4.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-spec4.C @@ -1,5 +1,5 @@ // { dg-do run } -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } #include diff --git a/gcc/testsuite/g++.dg/concepts/explicit-spec5.C b/gcc/testsuite/g++.dg/concepts/explicit-spec5.C index 8047278aa77e..e889c2192bfd 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-spec5.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-spec5.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } #include diff --git a/gcc/testsuite/g++.dg/concepts/explicit-spec6.C b/gcc/testsuite/g++.dg/concepts/explicit-spec6.C index 3eba9ff7bfd0..0bf7640df27c 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-spec6.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-spec6.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template struct A { diff --git a/gcc/testsuite/g++.dg/concepts/expression.C b/gcc/testsuite/g++.dg/concepts/expression.C index 5ae04e43a12e..de68ef89ee6f 100644 --- a/gcc/testsuite/g++.dg/concepts/expression.C +++ b/gcc/testsuite/g++.dg/concepts/expression.C @@ -1,5 +1,5 @@ // { dg-do run } -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } #include #include diff --git a/gcc/testsuite/g++.dg/concepts/expression2.C b/gcc/testsuite/g++.dg/concepts/expression2.C index 40c2034764a9..ebdadc231f38 100644 --- a/gcc/testsuite/g++.dg/concepts/expression2.C +++ b/gcc/testsuite/g++.dg/concepts/expression2.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool C1() diff --git a/gcc/testsuite/g++.dg/concepts/expression3.C b/gcc/testsuite/g++.dg/concepts/expression3.C index eb8406f13b01..77b414e5cfc3 100644 --- a/gcc/testsuite/g++.dg/concepts/expression3.C +++ b/gcc/testsuite/g++.dg/concepts/expression3.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool C() diff --git a/gcc/testsuite/g++.dg/concepts/feature-macro.C b/gcc/testsuite/g++.dg/concepts/feature-macro.C index 7bc787559ec8..d8ea36981474 100644 --- a/gcc/testsuite/g++.dg/concepts/feature-macro.C +++ b/gcc/testsuite/g++.dg/concepts/feature-macro.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++1z } +// { dg-options "-std=c++1z -fconcepts" } #ifndef __cpp_concepts #error __cpp_concepts not defined diff --git a/gcc/testsuite/g++.dg/concepts/fn-concept1.C b/gcc/testsuite/g++.dg/concepts/fn-concept1.C index 385dcbc13cf1..4a8437f010b3 100644 --- a/gcc/testsuite/g++.dg/concepts/fn-concept1.C +++ b/gcc/testsuite/g++.dg/concepts/fn-concept1.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool Tuple() { // { dg-error "multiple statements" } diff --git a/gcc/testsuite/g++.dg/concepts/fn-concept2.C b/gcc/testsuite/g++.dg/concepts/fn-concept2.C index 092c91c5b84c..86ba936d842b 100644 --- a/gcc/testsuite/g++.dg/concepts/fn-concept2.C +++ b/gcc/testsuite/g++.dg/concepts/fn-concept2.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept auto C1() { return 0; } // { dg-error "deduced return type" } diff --git a/gcc/testsuite/g++.dg/concepts/fn1.C b/gcc/testsuite/g++.dg/concepts/fn1.C index b2bdaf918852..c4f9f555e0a9 100644 --- a/gcc/testsuite/g++.dg/concepts/fn1.C +++ b/gcc/testsuite/g++.dg/concepts/fn1.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/fn10.C b/gcc/testsuite/g++.dg/concepts/fn10.C index f4cd4c5ce346..859c1d5eb218 100644 --- a/gcc/testsuite/g++.dg/concepts/fn10.C +++ b/gcc/testsuite/g++.dg/concepts/fn10.C @@ -1,5 +1,5 @@ // { dg-do compile } -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } // Test that constraint satisfaction checks work even when // processing template declarations. diff --git a/gcc/testsuite/g++.dg/concepts/fn2.C b/gcc/testsuite/g++.dg/concepts/fn2.C index 0aee852ce38f..51a3fb5fd8e0 100644 --- a/gcc/testsuite/g++.dg/concepts/fn2.C +++ b/gcc/testsuite/g++.dg/concepts/fn2.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/fn3.C b/gcc/testsuite/g++.dg/concepts/fn3.C index 06402e02c3bb..ef704f7e135d 100644 --- a/gcc/testsuite/g++.dg/concepts/fn3.C +++ b/gcc/testsuite/g++.dg/concepts/fn3.C @@ -1,5 +1,5 @@ // { dg-do run } -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } #include diff --git a/gcc/testsuite/g++.dg/concepts/fn4.C b/gcc/testsuite/g++.dg/concepts/fn4.C index 5ced6a7f390d..9fa5790fd5e9 100644 --- a/gcc/testsuite/g++.dg/concepts/fn4.C +++ b/gcc/testsuite/g++.dg/concepts/fn4.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/fn5.C b/gcc/testsuite/g++.dg/concepts/fn5.C index b3c3f70a8789..dd9a19e9f195 100644 --- a/gcc/testsuite/g++.dg/concepts/fn5.C +++ b/gcc/testsuite/g++.dg/concepts/fn5.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } // Check shorthand notation. diff --git a/gcc/testsuite/g++.dg/concepts/fn6.C b/gcc/testsuite/g++.dg/concepts/fn6.C index 73ef19a20a77..f6f165e09995 100644 --- a/gcc/testsuite/g++.dg/concepts/fn6.C +++ b/gcc/testsuite/g++.dg/concepts/fn6.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } // Redefinition errors. diff --git a/gcc/testsuite/g++.dg/concepts/fn7.C b/gcc/testsuite/g++.dg/concepts/fn7.C index 2abd34a1e780..dd16a9ae65b5 100644 --- a/gcc/testsuite/g++.dg/concepts/fn7.C +++ b/gcc/testsuite/g++.dg/concepts/fn7.C @@ -1,5 +1,5 @@ // { dg-do link } -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } // FIXME: What is this actually testing? diff --git a/gcc/testsuite/g++.dg/concepts/fn8.C b/gcc/testsuite/g++.dg/concepts/fn8.C index 71141f6ff557..e7481be2f05c 100644 --- a/gcc/testsuite/g++.dg/concepts/fn8.C +++ b/gcc/testsuite/g++.dg/concepts/fn8.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool Class() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/fn9.C b/gcc/testsuite/g++.dg/concepts/fn9.C index b7ac4e10a8da..c135bd7010a6 100644 --- a/gcc/testsuite/g++.dg/concepts/fn9.C +++ b/gcc/testsuite/g++.dg/concepts/fn9.C @@ -1,5 +1,5 @@ // { dg-do run } -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } #include diff --git a/gcc/testsuite/g++.dg/concepts/friend1.C b/gcc/testsuite/g++.dg/concepts/friend1.C index 286e7697c739..5c418cbf76cf 100644 --- a/gcc/testsuite/g++.dg/concepts/friend1.C +++ b/gcc/testsuite/g++.dg/concepts/friend1.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool Eq() { return requires(T t) { t == t; }; } diff --git a/gcc/testsuite/g++.dg/concepts/friend2.C b/gcc/testsuite/g++.dg/concepts/friend2.C index 38b230c4ff7a..6268801a260c 100644 --- a/gcc/testsuite/g++.dg/concepts/friend2.C +++ b/gcc/testsuite/g++.dg/concepts/friend2.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool Eq() { return requires(T t) { t == t; }; } diff --git a/gcc/testsuite/g++.dg/concepts/generic-fn-err.C b/gcc/testsuite/g++.dg/concepts/generic-fn-err.C index 1e975108257b..03a47d5c9597 100644 --- a/gcc/testsuite/g++.dg/concepts/generic-fn-err.C +++ b/gcc/testsuite/g++.dg/concepts/generic-fn-err.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/generic-fn.C b/gcc/testsuite/g++.dg/concepts/generic-fn.C index 778356db1803..d74ea21b6eff 100644 --- a/gcc/testsuite/g++.dg/concepts/generic-fn.C +++ b/gcc/testsuite/g++.dg/concepts/generic-fn.C @@ -1,5 +1,5 @@ // { dg-do run } -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } #include #include diff --git a/gcc/testsuite/g++.dg/concepts/iconv1.C b/gcc/testsuite/g++.dg/concepts/iconv1.C index c4dd38fe5b45..28f3566d4178 100644 --- a/gcc/testsuite/g++.dg/concepts/iconv1.C +++ b/gcc/testsuite/g++.dg/concepts/iconv1.C @@ -1,5 +1,5 @@ // PR c++/67240 -// { dg-options -std=c++1z } +// { dg-options "-std=c++1z -fconcepts" } int foo(int x) { diff --git a/gcc/testsuite/g++.dg/concepts/inherit-ctor1.C b/gcc/testsuite/g++.dg/concepts/inherit-ctor1.C index 29433ade7b4f..6f5115c6c85f 100644 --- a/gcc/testsuite/g++.dg/concepts/inherit-ctor1.C +++ b/gcc/testsuite/g++.dg/concepts/inherit-ctor1.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/inherit-ctor2.C b/gcc/testsuite/g++.dg/concepts/inherit-ctor2.C index 4f39203db4c3..435745a1fa9e 100644 --- a/gcc/testsuite/g++.dg/concepts/inherit-ctor2.C +++ b/gcc/testsuite/g++.dg/concepts/inherit-ctor2.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/inherit-ctor3.C b/gcc/testsuite/g++.dg/concepts/inherit-ctor3.C index 3d0ddf210d12..07499bb40f9d 100644 --- a/gcc/testsuite/g++.dg/concepts/inherit-ctor3.C +++ b/gcc/testsuite/g++.dg/concepts/inherit-ctor3.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/inherit-ctor4.C b/gcc/testsuite/g++.dg/concepts/inherit-ctor4.C index cd9565f660f0..4c53205466dd 100644 --- a/gcc/testsuite/g++.dg/concepts/inherit-ctor4.C +++ b/gcc/testsuite/g++.dg/concepts/inherit-ctor4.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/intro1.C b/gcc/testsuite/g++.dg/concepts/intro1.C index 1b5f5d14b7e5..5f036c4b6454 100644 --- a/gcc/testsuite/g++.dg/concepts/intro1.C +++ b/gcc/testsuite/g++.dg/concepts/intro1.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool C = __is_class(T); diff --git a/gcc/testsuite/g++.dg/concepts/intro2.C b/gcc/testsuite/g++.dg/concepts/intro2.C index 91a1cacf9c0e..1db1d7a493fb 100644 --- a/gcc/testsuite/g++.dg/concepts/intro2.C +++ b/gcc/testsuite/g++.dg/concepts/intro2.C @@ -1,5 +1,5 @@ // { dg-do run } -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } #include diff --git a/gcc/testsuite/g++.dg/concepts/intro3.C b/gcc/testsuite/g++.dg/concepts/intro3.C index 5dd95c698e12..3cb3ecbb8b4b 100644 --- a/gcc/testsuite/g++.dg/concepts/intro3.C +++ b/gcc/testsuite/g++.dg/concepts/intro3.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool C1 = true; diff --git a/gcc/testsuite/g++.dg/concepts/intro4.C b/gcc/testsuite/g++.dg/concepts/intro4.C index 6d8aec3ff616..182129165556 100644 --- a/gcc/testsuite/g++.dg/concepts/intro4.C +++ b/gcc/testsuite/g++.dg/concepts/intro4.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool C1 = true; diff --git a/gcc/testsuite/g++.dg/concepts/intro5.C b/gcc/testsuite/g++.dg/concepts/intro5.C index 64771cd6e251..31924f930a70 100644 --- a/gcc/testsuite/g++.dg/concepts/intro5.C +++ b/gcc/testsuite/g++.dg/concepts/intro5.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template concept bool C() diff --git a/gcc/testsuite/g++.dg/concepts/intro6.C b/gcc/testsuite/g++.dg/concepts/intro6.C index 4e168ef3c7dc..f8ed6669f14f 100644 --- a/gcc/testsuite/g++.dg/concepts/intro6.C +++ b/gcc/testsuite/g++.dg/concepts/intro6.C @@ -1,5 +1,5 @@ // PR c++/67003 -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } namespace X { template diff --git a/gcc/testsuite/g++.dg/concepts/intro7.C b/gcc/testsuite/g++.dg/concepts/intro7.C index d92eafcfbd57..914c5fd61100 100644 --- a/gcc/testsuite/g++.dg/concepts/intro7.C +++ b/gcc/testsuite/g++.dg/concepts/intro7.C @@ -1,5 +1,5 @@ // PR c++/66985 -// { dg-options "-std=c++1z" } +// { dg-options "-std=c++1z -fconcepts" } template