aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorBernardo Innocenti <bernie@develer.com>2004-07-25 04:50:57 +0200
committerBernardo Innocenti <bernie@gcc.gnu.org>2004-07-25 04:50:57 +0200
commitea06b1666dbe93688e73d088c07edfc14568c96f (patch)
treef832046097744412da69a434eeed69c6661ac35e /gcc/tree.c
parent02a0b1f29e8b1eeb52e8f6ea0408b2efdd4bdfa8 (diff)
downloadgcc-ea06b1666dbe93688e73d088c07edfc14568c96f.zip
gcc-ea06b1666dbe93688e73d088c07edfc14568c96f.tar.gz
gcc-ea06b1666dbe93688e73d088c07edfc14568c96f.tar.bz2
c-common.h (c_staticp): Change return type from int to bool.
* c-common.h (c_staticp): Change return type from int to bool. * tree.c (staticp): Likewise. * langhooks.h (staticp): Likewise. From-SVN: r85137
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index bcb8dff..6fa1375 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -1267,10 +1267,10 @@ array_type_nelts (tree type)
: fold (build2 (MINUS_EXPR, TREE_TYPE (max), max, min)));
}
-/* Return nonzero if arg is static -- a reference to an object in
+/* Return true if arg is static -- a reference to an object in
static storage. This is not the same as the C meaning of `static'. */
-int
+bool
staticp (tree arg)
{
switch (TREE_CODE (arg))
@@ -1291,7 +1291,7 @@ staticp (tree arg)
case LABEL_DECL:
case STRING_CST:
- return 1;
+ return true;
case COMPONENT_REF:
/* If the thing being referenced is not a field, then it is
@@ -1302,12 +1302,12 @@ staticp (tree arg)
/* If we are referencing a bitfield, we can't evaluate an
ADDR_EXPR at compile time and so it isn't a constant. */
if (DECL_BIT_FIELD (TREE_OPERAND (arg, 1)))
- return 0;
+ return false;
return staticp (TREE_OPERAND (arg, 0));
case BIT_FIELD_REF:
- return 0;
+ return false;
#if 0
/* This case is technically correct, but results in setting
@@ -1323,14 +1323,14 @@ staticp (tree arg)
&& TREE_CODE (TREE_OPERAND (arg, 1)) == INTEGER_CST)
return staticp (TREE_OPERAND (arg, 0));
else
- return 0;
+ return false;
default:
if ((unsigned int) TREE_CODE (arg)
>= (unsigned int) LAST_AND_UNUSED_TREE_CODE)
return lang_hooks.staticp (arg);
else
- return 0;
+ return false;
}
}