OSDN Git Service

2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
authormanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 7 Jul 2009 15:23:46 +0000 (15:23 +0000)
committermanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 7 Jul 2009 15:23:46 +0000 (15:23 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149333 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/c-format.c
gcc/config/mep/mep.c
gcc/pretty-print.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/format/gcc_diag-1.c

index d7a4f9c..9063958 100644 (file)
@@ -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.
index 3c73564..1f3748a 100644 (file)
@@ -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.  */
index 5bb372a..8a705ee 100644 (file)
@@ -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;
          }
     }
index 55bc3fe..9ec8030 100644 (file)
@@ -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);
index 2f8b25f..f533cf4 100644 (file)
@@ -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
index 6bfa3ce..2442604 100644 (file)
@@ -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);