aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorManuel López-Ibáñez <manu@gcc.gnu.org>2009-07-07 15:23:46 +0000
committerManuel López-Ibáñez <manu@gcc.gnu.org>2009-07-07 15:23:46 +0000
commitdcb91ebed3a93439ef4892c18420c8fd4295a1a3 (patch)
tree48fc147b480fccd2c625934e1915472ecd6a3e42 /gcc
parentcf400ddbafde8ae44c3b09c71e8305cd73c21688 (diff)
downloadgcc-dcb91ebed3a93439ef4892c18420c8fd4295a1a3.zip
gcc-dcb91ebed3a93439ef4892c18420c8fd4295a1a3.tar.gz
gcc-dcb91ebed3a93439ef4892c18420c8fd4295a1a3.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/c-format.c36
-rw-r--r--gcc/config/mep/mep.c8
-rw-r--r--gcc/pretty-print.c9
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/format/gcc_diag-1.c24
6 files changed, 16 insertions, 73 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d7a4f9c..9063958 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+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>
* final.c (pass_clean_state): Give the pass a name.
diff --git a/gcc/c-format.c b/gcc/c-format.c
index 3c73564..1f3748a 100644
--- a/gcc/c-format.c
+++ b/gcc/c-format.c
@@ -561,9 +561,6 @@ static const format_char_info gcc_diag_char_table[] =
/* 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. */
{ "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[] =
/* 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. */
{ "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[] =
/* 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. */
{ "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[] =
/* 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. */
{ "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)
xmemdup (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)
{
i = find_char_info_specifier_index (diag_fci, 'J');
@@ -2631,12 +2613,6 @@ init_dynamic_diag_info (void)
xmemdup (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)
{
/* All specifiers taking a tree share the same struct. */
@@ -2658,12 +2634,6 @@ init_dynamic_diag_info (void)
xmemdup (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)
{
/* All specifiers taking a tree share the same struct. */
@@ -2685,12 +2655,6 @@ init_dynamic_diag_info (void)
xmemdup (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)
{
/* All specifiers taking a tree share the same struct. */
diff --git a/gcc/config/mep/mep.c b/gcc/config/mep/mep.c
index 5bb372a..8a705ee 100644
--- a/gcc/config/mep/mep.c
+++ b/gcc/config/mep/mep.c
@@ -4601,13 +4601,13 @@ mep_select_section (tree decl, int reloc ATTRIBUTE_UNUSED,
case 'i':
case 'I':
- error ("%Hvariable %D of type %<io%> must be uninitialized",
- &DECL_SOURCE_LOCATION (decl), decl);
+ error_at (DECL_SOURCE_LOCATION (decl),
+ "variable %D of type %<io%> must be uninitialized", decl);
return data_section;
case 'c':
- error ("%Hvariable %D of type %<cb%> must be uninitialized",
- &DECL_SOURCE_LOCATION (decl), decl);
+ error_at (DECL_SOURCE_LOCATION (decl),
+ "variable %D of type %<cb%> must be uninitialized", decl);
return data_section;
}
}
diff --git a/gcc/pretty-print.c b/gcc/pretty-print.c
index 55bc3fe..9ec8030a 100644
--- a/gcc/pretty-print.c
+++ b/gcc/pretty-print.c
@@ -190,7 +190,6 @@ pp_base_indent (pretty_printer *pp)
%.*s: a substring the length of which is specified by an argument
integer.
%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.
%K: a statement, from which EXPR_LOCATION and TREE_BLOCK will be recorded.
Flag 'q': quote formatted text (must come immediately after '%').
@@ -476,14 +475,6 @@ pp_base_format (pretty_printer *pp, text_info *text)
(pp, *text->args_ptr, precision, unsigned, "x");
break;
- case 'H':
- {
- location_t *locus = va_arg (*text->args_ptr, location_t *);
- gcc_assert (text->locus != NULL);
- *text->locus = *locus;
- }
- break;
-
case 'J':
{
tree t = va_arg (*text->args_ptr, tree);
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 2f8b25f..f533cf4 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+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>
PR middle-end/40669
diff --git a/gcc/testsuite/gcc.dg/format/gcc_diag-1.c b/gcc/testsuite/gcc.dg/format/gcc_diag-1.c
index 6bfa3ce..2442604 100644
--- a/gcc/testsuite/gcc.dg/format/gcc_diag-1.c
+++ b/gcc/testsuite/gcc.dg/format/gcc_diag-1.c
@@ -69,10 +69,6 @@ foo (int i, int i1, int i2, unsigned int u, double d, char *s, void *p,
tdiag ("%m");
cdiag ("%m");
cxxdiag ("%m");
- diag ("%H", loc);
- tdiag ("%H", loc);
- cdiag ("%H", loc);
- cxxdiag ("%H", loc);
diag ("%J", t1);
tdiag ("%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,
tdiag ("%+m"); /* { dg-warning "format" "bogus modifier" } */
cdiag ("%+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" } */
tdiag ("%J"); /* { dg-warning "format" "missing arg" } */
cdiag ("%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" } */
tdiag ("%J", loc); /* { dg-warning "format" "wrong arg" } */
cdiag ("%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" } */
tdiag ("%A", t1); /* { dg-warning "format" "bogus tree" } */
tdiag ("%E", t1);