diff options
| author | bernie <bernie@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-25 02:50:57 +0000 | 
|---|---|---|
| committer | bernie <bernie@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-25 02:50:57 +0000 | 
| commit | 35808a9f61a2c89ada72b0ccc56a621cc4839d15 (patch) | |
| tree | f832046097744412da69a434eeed69c6661ac35e /gcc | |
| parent | 1fb66fffae857494550ce17f0e0d93d218e0a8d2 (diff) | |
| download | ppe42-gcc-35808a9f61a2c89ada72b0ccc56a621cc4839d15.tar.gz ppe42-gcc-35808a9f61a2c89ada72b0ccc56a621cc4839d15.zip | |
	* c-common.h (c_staticp): Change return type from int to bool.
	* tree.c (staticp): Likewise.
	* langhooks.h (staticp): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85137 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
| -rw-r--r-- | gcc/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/c-common.h | 2 | ||||
| -rw-r--r-- | gcc/langhooks.h | 2 | ||||
| -rw-r--r-- | gcc/tree.c | 14 | 
4 files changed, 15 insertions, 9 deletions
| diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 343d0e381b6..00ea5ba241a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@  2004-07-25  Bernardo Innocenti  <bernie@develer.com> +	* c-common.h (c_staticp): Change return type from int to bool. +	* tree.c (staticp): Likewise. +	* langhooks.h (staticp): Likewise. + +2004-07-25  Bernardo Innocenti  <bernie@develer.com> +  	* langhooks-def.h (lhd_staticp): Change return type from int to  	bool in prototype to match definition. diff --git a/gcc/c-common.h b/gcc/c-common.h index 8529acec8f6..6df90a4f215 100644 --- a/gcc/c-common.h +++ b/gcc/c-common.h @@ -832,7 +832,7 @@ extern int vector_types_convertible_p (tree t1, tree t2);  extern rtx c_expand_expr (tree, rtx, enum machine_mode, int, rtx *); -extern int c_staticp (tree); +extern bool c_staticp (tree);  extern int c_common_unsafe_for_reeval (tree); diff --git a/gcc/langhooks.h b/gcc/langhooks.h index 349c450a0cd..86774cf8f6d 100644 --- a/gcc/langhooks.h +++ b/gcc/langhooks.h @@ -304,7 +304,7 @@ struct lang_hooks    bool (*mark_addressable) (tree);    /* Hook called by staticp for language-specific tree codes.  */ -  int (*staticp) (tree); +  bool (*staticp) (tree);    /* Replace the DECL_LANG_SPECIFIC data, which may be NULL, of the       DECL_NODE with a newly GC-allocated copy.  */ diff --git a/gcc/tree.c b/gcc/tree.c index bcb8dffc8a4..6fa13757bb9 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;      }  } | 

