]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree.c (warn_deprecated_use): Print file:line using locus color.
authorJakub Jelinek <jakub@redhat.com>
Tue, 14 May 2013 19:41:13 +0000 (21:41 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 14 May 2013 19:41:13 +0000 (21:41 +0200)
* tree.c (warn_deprecated_use): Print file:line using locus color.
* diagnostic.c (diagnostic_report_current_module): Print file:line
and file:line:column using locus color.

From-SVN: r198900

gcc/ChangeLog
gcc/diagnostic.c
gcc/tree.c

index 8a2469fd76b2a647e514b9a461a898cacf8fe8ed..33c2491232299807f389b12194f67afcfc60ed25 100644 (file)
@@ -1,3 +1,9 @@
+2013-05-14  Jakub Jelinek  <jakub@redhat.com>
+
+       * tree.c (warn_deprecated_use): Print file:line using locus color.
+       * diagnostic.c (diagnostic_report_current_module): Print file:line
+       and file:line:column using locus color.
+
 2013-05-14  Mike Stump  <mikestump@comcast.net>
 
        * gdbinit.in: Add __null.
index f9a236b9113dcca4d8b29eec4fe05c6d00d154f3..2ec962014597637d58c6b142c953457d9d8b24a6 100644 (file)
@@ -517,18 +517,18 @@ diagnostic_report_current_module (diagnostic_context *context, location_t where)
          map = INCLUDED_FROM (line_table, map);
          if (context->show_column)
            pp_verbatim (context->printer,
-                        "In file included from %s:%d:%d",
+                        "In file included from %r%s:%d:%d%R", "locus",
                         LINEMAP_FILE (map),
                         LAST_SOURCE_LINE (map), LAST_SOURCE_COLUMN (map));
          else
            pp_verbatim (context->printer,
-                        "In file included from %s:%d",
+                        "In file included from %r%s:%d%R", "locus",
                         LINEMAP_FILE (map), LAST_SOURCE_LINE (map));
          while (! MAIN_FILE_P (map))
            {
              map = INCLUDED_FROM (line_table, map);
              pp_verbatim (context->printer,
-                          ",\n                 from %s:%d",
+                          ",\n                 from %r%s:%d%R", "locus",
                           LINEMAP_FILE (map), LAST_SOURCE_LINE (map));
            }
          pp_verbatim (context->printer, ":");
index d4e85e19ccd09de8473bbcf4c53c32a87c7f7eab..62909b07b646f900485236137d6901ddb86e4bec 100644 (file)
@@ -11715,12 +11715,12 @@ warn_deprecated_use (tree node, tree attr)
       expanded_location xloc = expand_location (DECL_SOURCE_LOCATION (node));
       if (msg)
        warning (OPT_Wdeprecated_declarations,
-                "%qD is deprecated (declared at %s:%d): %s",
-                node, xloc.file, xloc.line, msg);
+                "%qD is deprecated (declared at %r%s:%d%R): %s",
+                node, "locus", xloc.file, xloc.line, msg);
       else
        warning (OPT_Wdeprecated_declarations,
-                "%qD is deprecated (declared at %s:%d)",
-                node, xloc.file, xloc.line);
+                "%qD is deprecated (declared at %r%s:%d%R)",
+                node, "locus", xloc.file, xloc.line);
     }
   else if (TYPE_P (node))
     {
@@ -11744,23 +11744,23 @@ warn_deprecated_use (tree node, tree attr)
            {
              if (msg)
                warning (OPT_Wdeprecated_declarations,
-                        "%qE is deprecated (declared at %s:%d): %s",
-                        what, xloc.file, xloc.line, msg);
+                        "%qE is deprecated (declared at %r%s:%d%R): %s",
+                        what, "locus", xloc.file, xloc.line, msg);
              else
                warning (OPT_Wdeprecated_declarations,
-                        "%qE is deprecated (declared at %s:%d)", what,
-                        xloc.file, xloc.line);
+                        "%qE is deprecated (declared at %r%s:%d%R)",
+                        what, "locus", xloc.file, xloc.line);
            }
          else
            {
              if (msg)
                warning (OPT_Wdeprecated_declarations,
-                        "type is deprecated (declared at %s:%d): %s",
-                        xloc.file, xloc.line, msg);
+                        "type is deprecated (declared at %r%s:%d%R): %s",
+                        "locus", xloc.file, xloc.line, msg);
              else
                warning (OPT_Wdeprecated_declarations,
-                        "type is deprecated (declared at %s:%d)",
-                        xloc.file, xloc.line);
+                        "type is deprecated (declared at %r%s:%d%R)",
+                        "locus", xloc.file, xloc.line);
            }
        }
       else