aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/method.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2017-11-21 19:58:49 +0100
committerMartin Liska <marxin@gcc.gnu.org>2017-11-21 18:58:49 +0000
commit84fa214dea091e289950a41b70964de73a3c1172 (patch)
treef8fd9613d4d6845a439630a400e2ba440a186d11 /gcc/cp/method.c
parentfc3605f174962ccf6bfd537065c304d0c4270663 (diff)
downloadgcc-84fa214dea091e289950a41b70964de73a3c1172.zip
gcc-84fa214dea091e289950a41b70964de73a3c1172.tar.gz
gcc-84fa214dea091e289950a41b70964de73a3c1172.tar.bz2
Add quotes for constexpr keyword.
2017-11-21 Martin Liska <mliska@suse.cz> * class.c (finalize_literal_type_property): Add quotes for constexpr keyword. (explain_non_literal_class): Likewise. * constexpr.c (ensure_literal_type_for_constexpr_object): Likewise. (is_valid_constexpr_fn): Likewise. (check_constexpr_ctor_body): Likewise. (register_constexpr_fundef): Likewise. (explain_invalid_constexpr_fn): Likewise. (cxx_eval_builtin_function_call): Likewise. (cxx_eval_call_expression): Likewise. (cxx_eval_loop_expr): Likewise. (potential_constant_expression_1): Likewise. * decl.c (check_previous_goto_1): Likewise. (check_goto): Likewise. (grokfndecl): Likewise. (grokdeclarator): Likewise. * error.c (maybe_print_constexpr_context): Likewise. * method.c (process_subob_fn): Likewise. (defaulted_late_check): Likewise. * parser.c (cp_parser_compound_statement): Likewise. 2017-11-21 Martin Liska <mliska@suse.cz> * g++.dg/cpp0x/constexpr-48089.C: Add quotes for constexpr keyword; add dg-message for 'in .constexpr. expansion of '. * g++.dg/cpp0x/constexpr-50060.C: Likewise. * g++.dg/cpp0x/constexpr-60049.C: Likewise. * g++.dg/cpp0x/constexpr-70323.C: Likewise. * g++.dg/cpp0x/constexpr-70323a.C: Likewise. * g++.dg/cpp0x/constexpr-cast.C: Likewise. * g++.dg/cpp0x/constexpr-diag3.C: Likewise. * g++.dg/cpp0x/constexpr-ex1.C: Likewise. * g++.dg/cpp0x/constexpr-generated1.C: Likewise. * g++.dg/cpp0x/constexpr-ice16.C: Likewise. * g++.dg/cpp0x/constexpr-ice5.C: Likewise. * g++.dg/cpp0x/constexpr-incomplete2.C: Likewise. * g++.dg/cpp0x/constexpr-neg1.C: Likewise. * g++.dg/cpp0x/constexpr-recursion.C: Likewise. * g++.dg/cpp0x/constexpr-shift1.C: Likewise. * g++.dg/cpp1y/constexpr-70265-1.C: Likewise. * g++.dg/cpp1y/constexpr-70265-2.C: Likewise. * g++.dg/cpp1y/constexpr-79655.C: Likewise. * g++.dg/cpp1y/constexpr-new.C: Likewise. * g++.dg/cpp1y/constexpr-return2.C: Likewise. * g++.dg/cpp1y/constexpr-shift1.C: Likewise. * g++.dg/cpp1y/constexpr-throw.C: Likewise. * g++.dg/cpp1z/constexpr-lambda6.C: Likewise. * g++.dg/ext/constexpr-vla1.C: Likewise. * g++.dg/ext/constexpr-vla2.C: Likewise. * g++.dg/ext/constexpr-vla3.C: Likewise. * g++.dg/cpp0x/static_assert10.C: Likewise. * g++.dg/cpp1y/pr63996.C: Likewise. * g++.dg/cpp1y/pr68180.C: Likewise. * g++.dg/cpp1y/pr77830.C: Likewise. * g++.dg/ubsan/pr63956.C: Likewise. From-SVN: r255025
Diffstat (limited to 'gcc/cp/method.c')
-rw-r--r--gcc/cp/method.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 714b508..534aaa3 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -1293,7 +1293,7 @@ process_subob_fn (tree fn, tree *spec_p, bool *trivial_p,
if (diag)
{
inform (DECL_SOURCE_LOCATION (fn),
- "defaulted constructor calls non-constexpr %qD", fn);
+ "defaulted constructor calls non-%<constexpr%> %qD", fn);
explain_invalid_constexpr_fn (fn);
}
}
@@ -2257,8 +2257,8 @@ defaulted_late_check (tree fn)
if (!CLASSTYPE_TEMPLATE_INSTANTIATION (ctx))
{
error ("explicitly defaulted function %q+D cannot be declared "
- "as constexpr because the implicit declaration is not "
- "constexpr:", fn);
+ "as %<constexpr%> because the implicit declaration is not "
+ "%<constexpr%>:", fn);
explain_implicit_non_constexpr (fn);
}
DECL_DECLARED_CONSTEXPR_P (fn) = false;