]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix warnings for tree formats in gfc_error
authorPaul-Antoine Arras <parras@baylibre.com>
Fri, 28 Jun 2024 12:14:38 +0000 (14:14 +0200)
committerPaul-Antoine Arras <parras@baylibre.com>
Tue, 30 Jul 2024 08:35:21 +0000 (11:35 +0300)
This enables proper warnings for formats like %qD.

gcc/c-family/ChangeLog:

* c-format.cc (gcc_gfc_char_table): Add formats for tree objects.

gcc/c-family/c-format.cc

index 07b91a1c7a1db9182d69f392d4afd9754d23763f..7614f1e97ead614a576d9b907a30991251032cb4 100644 (file)
@@ -850,6 +850,10 @@ static const format_char_info gcc_gfc_char_table[] =
   /* This will require a "locus" at runtime.  */
   { "L",   0, STD_C89, { T89_V,   BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN  }, "", "R", NULL },
 
+  /* These will require a "tree" at runtime.  */
+  { "DFTV", 1, STD_C89, { T89_T,   BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN  }, "q+", "'",   NULL },
+  { "E",   1, STD_C89, { T89_T,   BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN,  BADLEN  }, "q+", "",   NULL },
+
   /* These will require nothing.  */
   { "<>",0, STD_C89, NOARGUMENTS, "",      "",   NULL },
   { NULL,  0, STD_C89, NOLENGTHS, NULL, NULL, NULL }