summaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authordberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-07 23:08:23 +0000
committerdberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-07 23:08:23 +0000
commitcf48439062da095caf46e3cbf672f3e3460543f8 (patch)
tree52566fdbb0b084676aa3532c776e0d3c48a44aae /gcc/c-common.c
parent4704b74336299aa76d106eb0b79897ee915c85cf (diff)
downloadgcc-cf48439062da095caf46e3cbf672f3e3460543f8.tar.gz
2007-04-07 Daniel Berlin <dberlin@dberlin.org>
Revert change removing staticp. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123650 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index af8b8aa075a..8f71e6916ed 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -4294,6 +4294,15 @@ c_expand_body (tree fndecl)
decl_fini_priority_lookup (fndecl));
}
+/* Hook used by staticp to handle language-specific tree codes. */
+
+tree
+c_staticp (tree exp)
+{
+ return (TREE_CODE (exp) == COMPOUND_LITERAL_EXPR
+ && TREE_STATIC (COMPOUND_LITERAL_EXPR_DECL (exp))
+ ? exp : NULL);
+}
/* Given a boolean expression ARG, return a tree representing an increment