summaryrefslogtreecommitdiff
path: root/gcc/diagnostic.c
diff options
context:
space:
mode:
authorgdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-07 11:59:52 +0000
committergdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-07 11:59:52 +0000
commitf73a66028805f9e00863f7fdcf91ed0423c10b8e (patch)
treea13e6b35d663ef787e8ad6315376985896dbd63f /gcc/diagnostic.c
parentc9c6d0b701fb6e6a447d83b7af86251ebed95593 (diff)
downloadgcc-f73a66028805f9e00863f7fdcf91ed0423c10b8e.tar.gz
* diagnostic.c (warn_deprecated_use): Move to toplev.c
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71168 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/diagnostic.c')
-rw-r--r--gcc/diagnostic.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c
index 8c8a86c2b38..3d64b87cfdd 100644
--- a/gcc/diagnostic.c
+++ b/gcc/diagnostic.c
@@ -550,44 +550,6 @@ fnotice (FILE *file, const char *msgid, ...)
va_end (ap);
}
-/* Warn about a use of an identifier which was marked deprecated. */
-void
-warn_deprecated_use (tree node)
-{
- if (node == 0 || !warn_deprecated_decl)
- return;
-
- if (DECL_P (node))
- warning ("`%s' is deprecated (declared at %s:%d)",
- IDENTIFIER_POINTER (DECL_NAME (node)),
- DECL_SOURCE_FILE (node), DECL_SOURCE_LINE (node));
- else if (TYPE_P (node))
- {
- const char *what = NULL;
- tree decl = TYPE_STUB_DECL (node);
-
- if (TREE_CODE (TYPE_NAME (node)) == IDENTIFIER_NODE)
- what = IDENTIFIER_POINTER (TYPE_NAME (node));
- else if (TREE_CODE (TYPE_NAME (node)) == TYPE_DECL
- && DECL_NAME (TYPE_NAME (node)))
- what = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (node)));
-
- if (what)
- {
- if (decl)
- warning ("`%s' is deprecated (declared at %s:%d)", what,
- DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl));
- else
- warning ("`%s' is deprecated", what);
- }
- else if (decl)
- warning ("type is deprecated (declared at %s:%d)",
- DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl));
- else
- warning ("type is deprecated");
- }
-}
-
/* Inform the user that an error occurred while trying to report some
other error. This indicates catastrophic internal inconsistencies,
so give up now. But do try to flush out the previous error.