aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 03950d6..8c7a897 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -2687,10 +2687,13 @@ struct GTY(()) tree_decl_minimal {
#define DECL_LANG_FLAG_8(NODE) \
(DECL_COMMON_CHECK (NODE)->decl_common.lang_flag_8)
+/* Nonzero for a scope which is equal to file scope. */
+#define SCOPE_FILE_SCOPE_P(EXP) \
+ (! (EXP) || TREE_CODE (EXP) == TRANSLATION_UNIT_DECL)
/* Nonzero for a decl which is at file scope. */
-#define DECL_FILE_SCOPE_P(EXP) \
- (! DECL_CONTEXT (EXP) \
- || TREE_CODE (DECL_CONTEXT (EXP)) == TRANSLATION_UNIT_DECL)
+#define DECL_FILE_SCOPE_P(EXP) SCOPE_FILE_SCOPE_P (DECL_CONTEXT (EXP))
+/* Nonzero for a type which is at file scope. */
+#define TYPE_FILE_SCOPE_P(EXP) SCOPE_FILE_SCOPE_P (TYPE_CONTEXT (EXP))
/* Nonzero for a decl that is decorated using attribute used.
This indicates to compiler tools that this decl needs to be preserved. */