aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPer Bothner <bothner@kalessin.cygnus.com>1995-08-25 19:06:24 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1995-08-25 19:06:24 -0400
commitd2ad151f7fb2ebf6685826b250e55e5038482a1c (patch)
tree493d4db2b550ba0e811aebbe2a255ee2672fcb0d
parent8d6e462ba263caef7e9663232267af59b15b86cd (diff)
downloadgcc-d2ad151f7fb2ebf6685826b250e55e5038482a1c.zip
gcc-d2ad151f7fb2ebf6685826b250e55e5038482a1c.tar.gz
gcc-d2ad151f7fb2ebf6685826b250e55e5038482a1c.tar.bz2
(DECL_DEAD_FOR_LOCAL, DECL_ERROR_REPORTED, DECL_SHADOWED_FOR_VAR): New
macros. From-SVN: r10274
-rw-r--r--gcc/cp/cp-tree.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index da7e119..07667f8 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -1067,6 +1067,10 @@ struct lang_decl
/* Next method in CLASSTYPE_METHODS list. */
#define DECL_NEXT_METHOD(NODE) (DECL_LANG_SPECIFIC(NODE)->next_method)
+/* In a VAR_DECL for a variable declared in a for statement,
+ this is the shadowed variable. */
+#define DECL_SHADOWED_FOR_VAR(NODE) DECL_RESULT(NODE)
+
/* Points back to the decl which caused this lang_decl to be allocated. */
#define DECL_MAIN_VARIANT(NODE) (DECL_LANG_SPECIFIC(NODE)->main_decl_variant)
@@ -1136,6 +1140,16 @@ struct lang_decl
#define DECL_PUBLIC(NODE) (DECL_LANG_FLAG_7 (NODE))
#endif
+extern int flag_new_for_scope;
+
+/* This flag is true of a local VAR_DECL if it was declared in a for
+ statement, but we are no longer in the scope of the for. */
+#define DECL_DEAD_FOR_LOCAL(NODE) DECL_LANG_FLAG_7 (NODE)
+
+/* This flag is set on a VAR_DECL that is a DECL_DEAD_FOR_LOCAL
+ if we already emitted a warning about using it. */
+#define DECL_ERROR_REPORTED(NODE) DECL_LANG_FLAG_0 (NODE)
+
/* This _DECL represents a compiler-generated entity. */
#define SET_DECL_ARTIFICIAL(NODE) (DECL_ARTIFICIAL (NODE) = 1)