pretty-print.c (pp_base_format): Remove %H.

2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	* pretty-print.c (pp_base_format): Remove %H.
	* c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
	gcc_cxxdiag_char_table): Likewise.
	(init_dynamic_diag_info): Likewise.
	* config/mep/mep.c (mep_select_section): Likewise.
	
testsuite/	
	* gcc.dg/format/gcc_diag-1.c: Remove tests for %H.

From-SVN: r149333
parent cf400ddb
2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
* pretty-print.c (pp_base_format): Remove %H.
* c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
gcc_cxxdiag_char_table): Likewise.
(init_dynamic_diag_info): Likewise.
* config/mep/mep.c (mep_select_section): Likewise.
2009-07-07 Duncan Sands <baldrick@free.fr> 2009-07-07 Duncan Sands <baldrick@free.fr>
* final.c (pass_clean_state): Give the pass a name. * final.c (pass_clean_state): Give the pass a name.
......
...@@ -561,9 +561,6 @@ static const format_char_info gcc_diag_char_table[] = ...@@ -561,9 +561,6 @@ static const format_char_info gcc_diag_char_table[] =
/* Custom conversion specifiers. */ /* Custom conversion specifiers. */
/* %H will require "location_t" at runtime. */
{ "H", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
/* These will require a "tree" at runtime. */ /* These will require a "tree" at runtime. */
{ "JK", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, { "JK", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
...@@ -584,9 +581,6 @@ static const format_char_info gcc_tdiag_char_table[] = ...@@ -584,9 +581,6 @@ static const format_char_info gcc_tdiag_char_table[] =
/* Custom conversion specifiers. */ /* Custom conversion specifiers. */
/* %H will require "location_t" at runtime. */
{ "H", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
/* These will require a "tree" at runtime. */ /* These will require a "tree" at runtime. */
{ "DFJKTE", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q+", "", NULL }, { "DFJKTE", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q+", "", NULL },
...@@ -607,9 +601,6 @@ static const format_char_info gcc_cdiag_char_table[] = ...@@ -607,9 +601,6 @@ static const format_char_info gcc_cdiag_char_table[] =
/* Custom conversion specifiers. */ /* Custom conversion specifiers. */
/* %H will require "location_t" at runtime. */
{ "H", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
/* These will require a "tree" at runtime. */ /* These will require a "tree" at runtime. */
{ "DEFJKT", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q+", "", NULL }, { "DEFJKT", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q+", "", NULL },
...@@ -630,9 +621,6 @@ static const format_char_info gcc_cxxdiag_char_table[] = ...@@ -630,9 +621,6 @@ static const format_char_info gcc_cxxdiag_char_table[] =
/* Custom conversion specifiers. */ /* Custom conversion specifiers. */
/* %H will require "location_t" at runtime. */
{ "H", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
/* These will require a "tree" at runtime. */ /* These will require a "tree" at runtime. */
{ "ADEFJKTV",0,STD_C89,{ T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q+#", "", NULL }, { "ADEFJKTV",0,STD_C89,{ T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q+#", "", NULL },
...@@ -2608,12 +2596,6 @@ init_dynamic_diag_info (void) ...@@ -2608,12 +2596,6 @@ init_dynamic_diag_info (void)
xmemdup (gcc_diag_char_table, xmemdup (gcc_diag_char_table,
sizeof (gcc_diag_char_table), sizeof (gcc_diag_char_table),
sizeof (gcc_diag_char_table)); sizeof (gcc_diag_char_table));
if (loc)
{
i = find_char_info_specifier_index (diag_fci, 'H');
diag_fci[i].types[0].type = &loc;
diag_fci[i].pointer_count = 1;
}
if (t) if (t)
{ {
i = find_char_info_specifier_index (diag_fci, 'J'); i = find_char_info_specifier_index (diag_fci, 'J');
...@@ -2631,12 +2613,6 @@ init_dynamic_diag_info (void) ...@@ -2631,12 +2613,6 @@ init_dynamic_diag_info (void)
xmemdup (gcc_tdiag_char_table, xmemdup (gcc_tdiag_char_table,
sizeof (gcc_tdiag_char_table), sizeof (gcc_tdiag_char_table),
sizeof (gcc_tdiag_char_table)); sizeof (gcc_tdiag_char_table));
if (loc)
{
i = find_char_info_specifier_index (tdiag_fci, 'H');
tdiag_fci[i].types[0].type = &loc;
tdiag_fci[i].pointer_count = 1;
}
if (t) if (t)
{ {
/* All specifiers taking a tree share the same struct. */ /* All specifiers taking a tree share the same struct. */
...@@ -2658,12 +2634,6 @@ init_dynamic_diag_info (void) ...@@ -2658,12 +2634,6 @@ init_dynamic_diag_info (void)
xmemdup (gcc_cdiag_char_table, xmemdup (gcc_cdiag_char_table,
sizeof (gcc_cdiag_char_table), sizeof (gcc_cdiag_char_table),
sizeof (gcc_cdiag_char_table)); sizeof (gcc_cdiag_char_table));
if (loc)
{
i = find_char_info_specifier_index (cdiag_fci, 'H');
cdiag_fci[i].types[0].type = &loc;
cdiag_fci[i].pointer_count = 1;
}
if (t) if (t)
{ {
/* All specifiers taking a tree share the same struct. */ /* All specifiers taking a tree share the same struct. */
...@@ -2685,12 +2655,6 @@ init_dynamic_diag_info (void) ...@@ -2685,12 +2655,6 @@ init_dynamic_diag_info (void)
xmemdup (gcc_cxxdiag_char_table, xmemdup (gcc_cxxdiag_char_table,
sizeof (gcc_cxxdiag_char_table), sizeof (gcc_cxxdiag_char_table),
sizeof (gcc_cxxdiag_char_table)); sizeof (gcc_cxxdiag_char_table));
if (loc)
{
i = find_char_info_specifier_index (cxxdiag_fci, 'H');
cxxdiag_fci[i].types[0].type = &loc;
cxxdiag_fci[i].pointer_count = 1;
}
if (t) if (t)
{ {
/* All specifiers taking a tree share the same struct. */ /* All specifiers taking a tree share the same struct. */
......
...@@ -4601,13 +4601,13 @@ mep_select_section (tree decl, int reloc ATTRIBUTE_UNUSED, ...@@ -4601,13 +4601,13 @@ mep_select_section (tree decl, int reloc ATTRIBUTE_UNUSED,
case 'i': case 'i':
case 'I': case 'I':
error ("%Hvariable %D of type %<io%> must be uninitialized", error_at (DECL_SOURCE_LOCATION (decl),
&DECL_SOURCE_LOCATION (decl), decl); "variable %D of type %<io%> must be uninitialized", decl);
return data_section; return data_section;
case 'c': case 'c':
error ("%Hvariable %D of type %<cb%> must be uninitialized", error_at (DECL_SOURCE_LOCATION (decl),
&DECL_SOURCE_LOCATION (decl), decl); "variable %D of type %<cb%> must be uninitialized", decl);
return data_section; return data_section;
} }
} }
......
...@@ -190,7 +190,6 @@ pp_base_indent (pretty_printer *pp) ...@@ -190,7 +190,6 @@ pp_base_indent (pretty_printer *pp)
%.*s: a substring the length of which is specified by an argument %.*s: a substring the length of which is specified by an argument
integer. integer.
%Ns: likewise, but length specified as constant in the format string. %Ns: likewise, but length specified as constant in the format string.
%H: location_t.
%J: a decl tree, from which DECL_SOURCE_LOCATION will be recorded. %J: a decl tree, from which DECL_SOURCE_LOCATION will be recorded.
%K: a statement, from which EXPR_LOCATION and TREE_BLOCK will be recorded. %K: a statement, from which EXPR_LOCATION and TREE_BLOCK will be recorded.
Flag 'q': quote formatted text (must come immediately after '%'). Flag 'q': quote formatted text (must come immediately after '%').
...@@ -476,14 +475,6 @@ pp_base_format (pretty_printer *pp, text_info *text) ...@@ -476,14 +475,6 @@ pp_base_format (pretty_printer *pp, text_info *text)
(pp, *text->args_ptr, precision, unsigned, "x"); (pp, *text->args_ptr, precision, unsigned, "x");
break; break;
case 'H':
{
location_t *locus = va_arg (*text->args_ptr, location_t *);
gcc_assert (text->locus != NULL);
*text->locus = *locus;
}
break;
case 'J': case 'J':
{ {
tree t = va_arg (*text->args_ptr, tree); tree t = va_arg (*text->args_ptr, tree);
......
2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
* gcc.dg/format/gcc_diag-1.c: Remove tests for %H.
2009-07-07 Jakub Jelinek <jakub@redhat.com> 2009-07-07 Jakub Jelinek <jakub@redhat.com>
PR middle-end/40669 PR middle-end/40669
......
...@@ -69,10 +69,6 @@ foo (int i, int i1, int i2, unsigned int u, double d, char *s, void *p, ...@@ -69,10 +69,6 @@ foo (int i, int i1, int i2, unsigned int u, double d, char *s, void *p,
tdiag ("%m"); tdiag ("%m");
cdiag ("%m"); cdiag ("%m");
cxxdiag ("%m"); cxxdiag ("%m");
diag ("%H", loc);
tdiag ("%H", loc);
cdiag ("%H", loc);
cxxdiag ("%H", loc);
diag ("%J", t1); diag ("%J", t1);
tdiag ("%J", t1); tdiag ("%J", t1);
cdiag ("%J", t1); cdiag ("%J", t1);
...@@ -107,34 +103,14 @@ foo (int i, int i1, int i2, unsigned int u, double d, char *s, void *p, ...@@ -107,34 +103,14 @@ foo (int i, int i1, int i2, unsigned int u, double d, char *s, void *p,
tdiag ("%+m"); /* { dg-warning "format" "bogus modifier" } */ tdiag ("%+m"); /* { dg-warning "format" "bogus modifier" } */
cdiag ("%+m"); /* { dg-warning "format" "bogus modifier" } */ cdiag ("%+m"); /* { dg-warning "format" "bogus modifier" } */
cxxdiag ("%+m"); /* { dg-warning "format" "bogus modifier" } */ cxxdiag ("%+m"); /* { dg-warning "format" "bogus modifier" } */
diag ("%H"); /* { dg-warning "format" "missing arg" } */
tdiag ("%H"); /* { dg-warning "format" "missing arg" } */
cdiag ("%H"); /* { dg-warning "format" "missing arg" } */
cxxdiag ("%H"); /* { dg-warning "format" "missing arg" } */
diag ("%J"); /* { dg-warning "format" "missing arg" } */ diag ("%J"); /* { dg-warning "format" "missing arg" } */
tdiag ("%J"); /* { dg-warning "format" "missing arg" } */ tdiag ("%J"); /* { dg-warning "format" "missing arg" } */
cdiag ("%J"); /* { dg-warning "format" "missing arg" } */ cdiag ("%J"); /* { dg-warning "format" "missing arg" } */
cxxdiag ("%J"); /* { dg-warning "format" "missing arg" } */ cxxdiag ("%J"); /* { dg-warning "format" "missing arg" } */
diag ("%H", i); /* { dg-warning "format" "wrong arg" } */
tdiag ("%H", i); /* { dg-warning "format" "wrong arg" } */
cdiag ("%H", i); /* { dg-warning "format" "wrong arg" } */
cxxdiag ("%H", i); /* { dg-warning "format" "wrong arg" } */
diag ("%H", p); /* { dg-warning "format" "wrong arg" } */
tdiag ("%H", p); /* { dg-warning "format" "wrong arg" } */
cdiag ("%H", p); /* { dg-warning "format" "wrong arg" } */
cxxdiag ("%H", p); /* { dg-warning "format" "wrong arg" } */
diag ("%J", loc); /* { dg-warning "format" "wrong arg" } */ diag ("%J", loc); /* { dg-warning "format" "wrong arg" } */
tdiag ("%J", loc); /* { dg-warning "format" "wrong arg" } */ tdiag ("%J", loc); /* { dg-warning "format" "wrong arg" } */
cdiag ("%J", loc); /* { dg-warning "format" "wrong arg" } */ cdiag ("%J", loc); /* { dg-warning "format" "wrong arg" } */
cxxdiag ("%J", loc); /* { dg-warning "format" "wrong arg" } */ cxxdiag ("%J", loc); /* { dg-warning "format" "wrong arg" } */
diag ("%#H", loc); /* { dg-warning "format" "bogus modifier" } */
tdiag ("%#H", loc); /* { dg-warning "format" "bogus modifier" } */
cdiag ("%#H", loc); /* { dg-warning "format" "bogus modifier" } */
cxxdiag ("%#H", loc); /* { dg-warning "format" "bogus modifier" } */
diag ("%+H", loc); /* { dg-warning "format" "bogus modifier" } */
tdiag ("%+H", loc); /* { dg-warning "format" "bogus modifier" } */
cdiag ("%+H", loc); /* { dg-warning "format" "bogus modifier" } */
cxxdiag ("%+H", loc); /* { dg-warning "format" "bogus modifier" } */
diag ("%D", t1); /* { dg-warning "format" "bogus tree" } */ diag ("%D", t1); /* { dg-warning "format" "bogus tree" } */
tdiag ("%A", t1); /* { dg-warning "format" "bogus tree" } */ tdiag ("%A", t1); /* { dg-warning "format" "bogus tree" } */
tdiag ("%E", t1); tdiag ("%E", t1);
......
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