summaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authordj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2005-07-22 02:10:23 +0000
committerdj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2005-07-22 02:10:23 +0000
commitb9e7682530ab6bc0777693d36c55876be1ce33c5 (patch)
treecd723e6b679a9784904b1526e5469a0424079fd3 /gcc/toplev.c
parentff296ce1644f40df40a32be224a8ce8aef362f2d (diff)
downloadgcc-b9e7682530ab6bc0777693d36c55876be1ce33c5.tar.gz
* toplev.c (warn_deprecated_use): Add warning control to warning
call. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102264 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 368e9e60b20..5ad62dd6ecf 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");
}
}
}