2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
authormanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 7 Jul 2009 15:29:12 +0000 (15:29 +0000)
committermanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 7 Jul 2009 15:29:12 +0000 (15:29 +0000)
* pretty-print.c (pp_base_format): Remove %J.
* c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
gcc_cxxdiag_char_table): Likewise.
(init_dynamic_diag_info): Likewise.

testsuite/
* gcc.dg/format/gcc_diag-1.c: Remove tests for %J.

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

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

index 9063958..c056788 100644 (file)
@@ -1,5 +1,12 @@
 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
 
+       * pretty-print.c (pp_base_format): Remove %J.
+       * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
+       gcc_cxxdiag_char_table): Likewise.
+       (init_dynamic_diag_info): Likewise.
+       
+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.
index 1f3748a..38a4b60 100644 (file)
@@ -562,7 +562,7 @@ static const format_char_info gcc_diag_char_table[] =
   /* Custom conversion specifiers.  */
 
   /* 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 },
+  { "K", 0, STD_C89, { T89_V,   BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN  }, "q",    "",   NULL },
 
   { "<>'", 0, STD_C89, NOARGUMENTS, "",      "",   NULL },
   { "m",   0, STD_C89, NOARGUMENTS, "q",     "",   NULL },
@@ -582,7 +582,7 @@ static const format_char_info gcc_tdiag_char_table[] =
   /* Custom conversion specifiers.  */
 
   /* These will require a "tree" at runtime.  */
-  { "DFJKTE", 0, STD_C89, { T89_V,   BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN  }, "q+", "",   NULL },
+  { "DFKTE", 0, STD_C89, { T89_V,   BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN  }, "q+", "",   NULL },
 
   { "<>'", 0, STD_C89, NOARGUMENTS, "",      "",   NULL },
   { "m",   0, STD_C89, NOARGUMENTS, "q",     "",   NULL },
@@ -602,7 +602,7 @@ static const format_char_info gcc_cdiag_char_table[] =
   /* Custom conversion specifiers.  */
 
   /* 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 },
+  { "DEFKT", 0, STD_C89, { T89_V,   BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN  }, "q+", "",   NULL },
 
   { "<>'", 0, STD_C89, NOARGUMENTS, "",      "",   NULL },
   { "m",   0, STD_C89, NOARGUMENTS, "q",     "",   NULL },
@@ -622,7 +622,7 @@ static const format_char_info gcc_cxxdiag_char_table[] =
   /* Custom conversion specifiers.  */
 
   /* 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 },
+  { "ADEFKTV",0,STD_C89,{ T89_V,   BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN  }, "q+#",   "",   NULL },
 
   /* These accept either an 'int' or an 'enum tree_code' (which is handled as an 'int'.)  */
   { "CLOPQ",0,STD_C89, { T89_I,   BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN  }, "q",  "",   NULL },
@@ -2598,9 +2598,6 @@ init_dynamic_diag_info (void)
                              sizeof (gcc_diag_char_table));
       if (t)
        {
-         i = find_char_info_specifier_index (diag_fci, 'J');
-         diag_fci[i].types[0].type = &t;
-         diag_fci[i].pointer_count = 1;
          i = find_char_info_specifier_index (diag_fci, 'K');
          diag_fci[i].types[0].type = &t;
          diag_fci[i].pointer_count = 1;
@@ -2619,9 +2616,6 @@ init_dynamic_diag_info (void)
          i = find_char_info_specifier_index (tdiag_fci, 'D');
          tdiag_fci[i].types[0].type = &t;
          tdiag_fci[i].pointer_count = 1;
-         i = find_char_info_specifier_index (tdiag_fci, 'J');
-         tdiag_fci[i].types[0].type = &t;
-         tdiag_fci[i].pointer_count = 1;
          i = find_char_info_specifier_index (tdiag_fci, 'K');
          tdiag_fci[i].types[0].type = &t;
          tdiag_fci[i].pointer_count = 1;
@@ -2640,9 +2634,6 @@ init_dynamic_diag_info (void)
          i = find_char_info_specifier_index (cdiag_fci, 'D');
          cdiag_fci[i].types[0].type = &t;
          cdiag_fci[i].pointer_count = 1;
-         i = find_char_info_specifier_index (cdiag_fci, 'J');
-         cdiag_fci[i].types[0].type = &t;
-         cdiag_fci[i].pointer_count = 1;
          i = find_char_info_specifier_index (cdiag_fci, 'K');
          cdiag_fci[i].types[0].type = &t;
          cdiag_fci[i].pointer_count = 1;
@@ -2661,9 +2652,6 @@ init_dynamic_diag_info (void)
          i = find_char_info_specifier_index (cxxdiag_fci, 'D');
          cxxdiag_fci[i].types[0].type = &t;
          cxxdiag_fci[i].pointer_count = 1;
-         i = find_char_info_specifier_index (cxxdiag_fci, 'J');
-         cxxdiag_fci[i].types[0].type = &t;
-         cxxdiag_fci[i].pointer_count = 1;
          i = find_char_info_specifier_index (cxxdiag_fci, 'K');
          cxxdiag_fci[i].types[0].type = &t;
          cxxdiag_fci[i].pointer_count = 1;
index 9ec8030..94952c3 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.
-   %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 '%').
 
@@ -475,14 +474,6 @@ pp_base_format (pretty_printer *pp, text_info *text)
              (pp, *text->args_ptr, precision, unsigned, "x");
          break;
 
-       case 'J':
-         {
-           tree t = va_arg (*text->args_ptr, tree);
-           gcc_assert (text->locus != NULL);
-           *text->locus = DECL_SOURCE_LOCATION (t);
-         }
-         break;
-
        case 'K':
          {
            tree t = va_arg (*text->args_ptr, tree), block;
index f533cf4..95b0406 100644 (file)
@@ -1,5 +1,9 @@
 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
 
+       * gcc.dg/format/gcc_diag-1.c: Remove tests for %J.
+
+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>
index 2442604..46013c8 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 ("%J", t1);
-  tdiag ("%J", t1);
-  cdiag ("%J", t1);
-  cxxdiag ("%J", t1);
 
   tdiag ("%D%F%T", t1, t1, t1);
   tdiag ("%+D%+F%+T", t1, t1, t1);
@@ -103,14 +99,6 @@ 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 ("%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 ("%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 ("%D", t1); /* { dg-warning "format" "bogus tree" } */
   tdiag ("%A", t1); /* { dg-warning "format" "bogus tree" } */
   tdiag ("%E", t1);