aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorGraham Stott <grahams@redhat.com>2002-01-12 13:45:39 +0000
committerGraham Stott <grahams@gcc.gnu.org>2002-01-12 13:45:39 +0000
commitf9f6b7df9dbea592ddb6f9230992872fee866a03 (patch)
tree43e7dd937fa3ea2a493d8688200b94582d288196 /gcc
parent4a69261704c060c8a7ff364dc570571f6c80569e (diff)
downloadgcc-f9f6b7df9dbea592ddb6f9230992872fee866a03.zip
gcc-f9f6b7df9dbea592ddb6f9230992872fee866a03.tar.gz
gcc-f9f6b7df9dbea592ddb6f9230992872fee866a03.tar.bz2
attribs.c (handle_deprecated_attribute): constify WHAT.
* attribs.c (handle_deprecated_attribute): constify WHAT. * diagnostic.c (warn_deprecated_use): Add braces, fixes dangling else warning and constify WHAT. * except.h (struct function, struct inline_remap): Move struct tag forward defs before all prototypes. (duplicate_eh_regions): Whitespace. From-SVN: r48799
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/attribs.c2
-rw-r--r--gcc/diagnostic.c66
-rw-r--r--gcc/except.h9
4 files changed, 48 insertions, 38 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 604c10b..91e6b7a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2002-01-12 Graham Stott <grahams@redhat.com>
+
+ * attribs.c (handle_deprecated_attribute): constify WHAT.
+ * diagnostic.c (warn_deprecated_use): Add braces, fixes
+ dangling else warning and constify WHAT.
+ * except.h (struct function, struct inline_remap): Move
+ struct tag forward defs before all prototypes.
+ (duplicate_eh_regions): Whitespace.
+
2002-01-12 Nick Clifton <nickc@cambridge.redhat.com>
* config/arm/arm.h (ARM_LEGITIMIZE_RELOAD_ADDRESS): Use
diff --git a/gcc/attribs.c b/gcc/attribs.c
index f342cd1..2f2096d 100644
--- a/gcc/attribs.c
+++ b/gcc/attribs.c
@@ -1148,7 +1148,7 @@ handle_deprecated_attribute (node, name, args, flags, no_add_attrs)
{
tree type = NULL_TREE;
int warn = 0;
- char *what = NULL;
+ const char *what = NULL;
if (DECL_P (*node))
{
diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c
index ac3539b..7633523 100644
--- a/gcc/diagnostic.c
+++ b/gcc/diagnostic.c
@@ -1526,38 +1526,40 @@ warn_deprecated_use (node)
tree node;
{
if (node && warn_deprecated_decl)
- 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))
- {
- char *what = NULL;
- tree decl = TYPE_STUB_DECL (node);
+ {
+ 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 (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");
- }
- }
+ 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");
+ }
+ }
+ }
}
diff --git a/gcc/except.h b/gcc/except.h
index 901ec4b..f543c46 100644
--- a/gcc/except.h
+++ b/gcc/except.h
@@ -26,6 +26,9 @@ struct varray_head_tag;
#define varray_type struct varray_head_tag *
#endif
+struct function;
+
+struct inline_remap;
/* Per-function EH data. Used only in except.c, but GC and others
manipulate pointers to the opaque type. */
@@ -127,12 +130,8 @@ extern rtx expand_builtin_frob_return_addr PARAMS ((tree));
extern rtx expand_builtin_dwarf_fp_regnum PARAMS ((void));
extern void expand_builtin_eh_return PARAMS ((tree, tree));
extern void expand_eh_return PARAMS ((void));
-
extern rtx get_exception_pointer PARAMS ((struct function *));
-
-struct function;
-struct inline_remap;
-extern int duplicate_eh_regions PARAMS ((struct function *,
+extern int duplicate_eh_regions PARAMS ((struct function *,
struct inline_remap *));
extern void sjlj_emit_function_exit_after PARAMS ((rtx));