aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2005-07-21 22:10:23 -0400
committerDJ Delorie <dj@gcc.gnu.org>2005-07-21 22:10:23 -0400
commit30c54de9f2eb46d6f0bd9b2f4f2fdd4b875b904b (patch)
treecd723e6b679a9784904b1526e5469a0424079fd3
parent95a8c1557208047f816fcc51d45546ec00330d44 (diff)
downloadgcc-30c54de9f2eb46d6f0bd9b2f4f2fdd4b875b904b.zip
gcc-30c54de9f2eb46d6f0bd9b2f4f2fdd4b875b904b.tar.gz
gcc-30c54de9f2eb46d6f0bd9b2f4f2fdd4b875b904b.tar.bz2
toplev.c (warn_deprecated_use): Add warning control to warning call.
* toplev.c (warn_deprecated_use): Add warning control to warning call. From-SVN: r102264
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/toplev.c15
2 files changed, 14 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0db59f1..34b0263 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2005-07-21 DJ Delorie <dj@redhat.com>
+
+ * toplev.c (warn_deprecated_use): Add warning control to warning
+ call.
+
2005-07-21 Richard Henderson <rth@redhat.com>
PR tree-opt/22504
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 368e9e6..5ad62dd 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -875,7 +875,8 @@ warn_deprecated_use (tree node)
if (DECL_P (node))
{
expanded_location xloc = expand_location (DECL_SOURCE_LOCATION (node));
- warning (0, "%qs is deprecated (declared at %s:%d)",
+ warning (OPT_Wdeprecated_declarations,
+ "%qs is deprecated (declared at %s:%d)",
IDENTIFIER_POINTER (DECL_NAME (node)),
xloc.file, xloc.line);
}
@@ -898,18 +899,20 @@ warn_deprecated_use (tree node)
expanded_location xloc
= expand_location (DECL_SOURCE_LOCATION (decl));
if (what)
- warning (0, "%qs is deprecated (declared at %s:%d)", what,
- xloc.file, xloc.line);
+ warning (OPT_Wdeprecated_declarations,
+ "%qs is deprecated (declared at %s:%d)", what,
+ xloc.file, xloc.line);
else
- warning (0, "type is deprecated (declared at %s:%d)",
+ warning (OPT_Wdeprecated_declarations,
+ "type is deprecated (declared at %s:%d)",
xloc.file, xloc.line);
}
else
{
if (what)
- warning (0, "%qs is deprecated", what);
+ warning (OPT_Wdeprecated_declarations, "%qs is deprecated", what);
else
- warning (0, "type is deprecated");
+ warning (OPT_Wdeprecated_declarations, "type is deprecated");
}
}
}