Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
43f9ce02
Commit
43f9ce02
authored
Sep 07, 2003
by
Gabriel Dos Reis
Committed by
Gabriel Dos Reis
Sep 07, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* diagnostic.c (warn_deprecated_use): Move to toplev.c
From-SVN: r71168
parent
c57e1598
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
38 deletions
+42
-38
gcc/ChangeLog
+4
-0
gcc/diagnostic.c
+0
-38
gcc/toplev.c
+38
-0
No files found.
gcc/ChangeLog
View file @
43f9ce02
2003-09-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
* diagnostic.c (warn_deprecated_use): Move to toplev.c
2003-09-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
* langhooks.c (lhd_print_error_function): Move from diagnostic.c.
* Makefile.in (langhooks.o): Depend on diagnostic.h
...
...
gcc/diagnostic.c
View file @
43f9ce02
...
...
@@ -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.
...
...
gcc/toplev.c
View file @
43f9ce02
...
...
@@ -1702,6 +1702,44 @@ check_global_declarations (tree *vec, int len)
}
}
/* 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"
);
}
}
/* Save the current INPUT_LOCATION on the top entry in the
INPUT_FILE_STACK. Push a new entry for FILE and LINE, and set the
INPUT_LOCATION accordingly. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment