/* Name-satisfaction for GNU Chill compiler.
- Copyright (C) 1993, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
tree decl;
};
-/* forward declaration */
-tree satisfy PROTO((tree, struct decl_chain *));
+/* forward declarations */
+static tree satisfy PARAMS ((tree, struct decl_chain *));
+static void cycle_error_print PARAMS ((struct decl_chain *, tree));
+static tree safe_satisfy_decl PARAMS ((tree, struct decl_chain *));
+static void satisfy_list PARAMS ((tree, struct decl_chain *));
+static void satisfy_list_values PARAMS ((tree, struct decl_chain *));
static struct decl_chain dummy_chain;
#define LOOKUP_ONLY (chain==&dummy_chain)
}
}
-tree
+static tree
safe_satisfy_decl (decl, prev_chain)
tree decl;
struct decl_chain *prev_chain;
struct decl_chain new_link;
struct decl_chain *link;
struct decl_chain *chain = prev_chain;
- char *save_filename = input_filename;
+ const char *save_filename = input_filename;
int save_lineno = lineno;
tree result = decl;
{
if (!pointer_type_breaks_cycle)
{
- error_with_decl (decl, "Cycle: `%s' depends on ...");
+ error_with_decl (decl, "cycle: `%s' depends on ...");
cycle_error_print (prev_chain, decl);
error_with_decl (decl, " `%s'");
return error_mark_node;
}
/* DECL_SIZE is set to prevent re-doing this stuff. */
DECL_SIZE (decl) = TYPE_SIZE (TREE_TYPE (decl));
+ DECL_SIZE_UNIT (decl) = TYPE_SIZE_UNIT (TREE_TYPE (decl));
+
if (! TREE_CONSTANT (DECL_INITIAL (decl))
&& TREE_CODE (DECL_INITIAL (decl)) != ERROR_MARK)
{
case FUNCTION_DECL:
SATISFY (TREE_TYPE (decl));
if (CH_DECL_PROCESS (decl))
- safe_satisfy_decl (DECL_TASKING_CODE_DECL (decl),
- prev_chain);
+ safe_satisfy_decl ((tree) DECL_TASKING_CODE_DECL (decl), prev_chain);
break;
case PARM_DECL:
SATISFY (TREE_TYPE (decl));
case TYPE_DECL:
SATISFY (TREE_TYPE (decl));
if (CH_DECL_SIGNAL (decl))
- safe_satisfy_decl (DECL_TASKING_CODE_DECL (decl),
- prev_chain);
+ safe_satisfy_decl ((tree) DECL_TASKING_CODE_DECL (decl), prev_chain);
if (!LOOKUP_ONLY)
{
if (TYPE_NAME (TREE_TYPE (decl)) == NULL_TREE)
}
}
-tree
+static tree
satisfy (exp, chain)
tree exp;
struct decl_chain *chain;
default:
;
}
- arg_length = tree_code_length[TREE_CODE (exp)];
+
+ arg_length = TREE_CODE_LENGTH (TREE_CODE (exp));
for (i = 0; i < arg_length; i++)
SATISFY (TREE_OPERAND (exp, i));
return exp;
/* if we have an ACCESS or TEXT mode we have to set
maximum_field_alignment to 0 to fit with runtime
system, even when we compile with -fpack. */
- extern int maximum_field_alignment;
- int save_maximum_field_alignment = maximum_field_alignment;
+ unsigned int save_maximum_field_alignment = maximum_field_alignment;
if (CH_IS_ACCESS_MODE (exp) || CH_IS_TEXT_MODE (exp))
maximum_field_alignment = 0;