Commit 3f04b1bb by Jason Merrill Committed by Jason Merrill

c-format.c (gcc_cxxdiag_char_table): Add %X.

c-family/
	* c-format.c (gcc_cxxdiag_char_table): Add %X.
cp/
	* error.c (eh_spec_to_string): New.
	(cp_printer): Use it for %X.

From-SVN: r203988
parent e28030cf
2013-10-23 Jason Merrill <jason@redhat.com>
* c-format.c (gcc_cxxdiag_char_table): Add %X.
2013-10-11 Jakub Jelinek <jakub@redhat.com> 2013-10-11 Jakub Jelinek <jakub@redhat.com>
* c-common.h (omp_clause_mask::operator !=): New method. * c-common.h (omp_clause_mask::operator !=): New method.
......
...@@ -721,7 +721,7 @@ static const format_char_info gcc_cxxdiag_char_table[] = ...@@ -721,7 +721,7 @@ static const format_char_info gcc_cxxdiag_char_table[] =
/* Custom conversion specifiers. */ /* Custom conversion specifiers. */
/* These will require a "tree" at runtime. */ /* These will require a "tree" at runtime. */
{ "ADEFKSTV",0,STD_C89,{ T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q+#", "", NULL }, { "ADEFKSTVX",0,STD_C89,{ T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q+#", "", NULL },
{ "v", 0,STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q#", "", NULL }, { "v", 0,STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q#", "", NULL },
......
2013-10-23 Jason Merrill <jason@redhat.com> 2013-10-23 Jason Merrill <jason@redhat.com>
* error.c (eh_spec_to_string): New.
(cp_printer): Use it for %X.
In C++11 a trivial [cd]tor might not be callable. In C++11 a trivial [cd]tor might not be callable.
* class.c (user_provided_p): A function deleted on its declation * class.c (user_provided_p): A function deleted on its declation
in the class is not user-provided. in the class is not user-provided.
......
...@@ -2998,6 +2998,15 @@ cv_to_string (tree p, int v) ...@@ -2998,6 +2998,15 @@ cv_to_string (tree p, int v)
return pp_ggc_formatted_text (cxx_pp); return pp_ggc_formatted_text (cxx_pp);
} }
static const char *
eh_spec_to_string (tree p, int /*v*/)
{
int flags = 0;
reinit_cxx_pp ();
dump_exception_spec (cxx_pp, p, flags);
return pp_ggc_formatted_text (cxx_pp);
}
/* Langhook for print_error_function. */ /* Langhook for print_error_function. */
void void
cxx_print_error_function (diagnostic_context *context, const char *file, cxx_print_error_function (diagnostic_context *context, const char *file,
...@@ -3379,8 +3388,10 @@ maybe_print_constexpr_context (diagnostic_context *context) ...@@ -3379,8 +3388,10 @@ maybe_print_constexpr_context (diagnostic_context *context)
%O binary operator. %O binary operator.
%P function parameter whose position is indicated by an integer. %P function parameter whose position is indicated by an integer.
%Q assignment operator. %Q assignment operator.
%S substitution (template + args)
%T type. %T type.
%V cv-qualifier. */ %V cv-qualifier.
%X exception-specification. */
static bool static bool
cp_printer (pretty_printer *pp, text_info *text, const char *spec, cp_printer (pretty_printer *pp, text_info *text, const char *spec,
int precision, bool wide, bool set_locus, bool verbose) int precision, bool wide, bool set_locus, bool verbose)
...@@ -3427,6 +3438,7 @@ cp_printer (pretty_printer *pp, text_info *text, const char *spec, ...@@ -3427,6 +3438,7 @@ cp_printer (pretty_printer *pp, text_info *text, const char *spec,
case 'S': result = subst_to_string (next_tree); break; case 'S': result = subst_to_string (next_tree); break;
case 'T': result = type_to_string (next_tree, verbose); break; case 'T': result = type_to_string (next_tree, verbose); break;
case 'V': result = cv_to_string (next_tree, verbose); break; case 'V': result = cv_to_string (next_tree, verbose); break;
case 'X': result = eh_spec_to_string (next_tree, verbose); break;
case 'K': case 'K':
percent_K_format (text); percent_K_format (text);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment