* Makefile.in (ch-version.c): Constify a char*.
* actions.c (id_cmp, warn_unhandled, adjust_return_value,
update_else_range_for_int_const, update_else_range_for_range,
update_else_range_for_range_expr, update_else_range_for_type,
compute_else_range, check_case_value,
chill_handle_case_label_range,
chill_handle_multi_case_label_range,
chill_handle_multi_case_else_label, chill_handle_multi_case_label,
chill_handle_multi_case_label_list print_missing_cases): Add
static prototypes.
(build_exception_variant): Cast the function argument of qsort.
(build_rts_call, warn_unhandled, chill_convert_for_assignment,
adjust_return_value, chill_expand_result,
build_multi_case_selector_expression, print_missing_cases):
Constify a char*.
(print_missing_cases): Introduce an intermediary non-const ptr.
Add brackets and indent.
* ch-tree.h (maybe_building_objc_message_expr,
maybe_objc_comptypes, comptypes_record_hook): Remove declarations.
(push_handler, pop_handler): Add prototypes.
(builtin_function, valid_array_index_p,
build_chill_exception_decl, build_rts_call,
chill_convert_for_assignment, display_int_cst,
build_chill_addr_expr, check_have_mode, get_identifier3,
build_chill_string, register_seize_path, get_unique_identifier,
add_taskstuff_to_list, gnuchill_version): Constify a char*.
(finish_chill_function): Add void prototype argument.
* convert.c (convert_to_reference, convert_to_boolean,
convert_to_char, base_type_size_in_bytes, remove_tree_element,
check_ps_range, digest_powerset_tuple, digest_structure_tuple,
digest_array_tuple, convert1): Add static prototypes.
(base_type_size_in_bytes): Hide unused function.
(display_int_cst, digest_array_tuple): Constify a char*.
* decl.c (set_nesting_level, make_chill_variants, fix_identifier,
proclaim_decl, maybe_acons, push_scope_decls, pop_scope_decls,
build_implied_names, bind_sub_modules, layout_array_type,
do_based_decl, handle_one_level, label_value_cmp,
find_implied_types): Add static prototypes.
(boolean_code_name, chill_tree_code_type, chill_tree_code_name):
Constify a char*.
(layout_chill_variants): Cast the function argument of qsort.
(start_chill_function, fix_identifier, init_decl_processing):
Constify a char*.
(init_decl_processing): Prefer memcpy over bcopy to avoid casts.
Use xcalloc instead of xmalloc/bzero.
(builtin_function, build_chill_exception_decl,
finish_outer_function): Constify a char*.
* except.c (start_handler_array, finish_handler_array): Add static
prototypes.
* expr.c (chill_expand_expr, chill_expand_case_expr,
check_arglist_length, internal_build_compound_expr,
is_really_instance, invalid_operand, invalid_right_operand,
build_chill_abstime, build_allocate_memory_call,
build_allocate_global_memory_call, build_return_memory,
build_chill_duration, build_chill_floatcall,
build_allocate_getstack, build_chill_allocate,
build_chill_getstack, build_chill_terminate, build_chill_inttime,
build_chill_lower_or_upper, build_max_min,
build_chill_pred_or_succ, expand_packed_set, fold_set_expr,
build_compare_set_expr, scalar_to_string, build_concat_expr,
build_compare_string_expr, compare_records, string_char_rep,
build_boring_bitstring): Add static prototypes.
(check_have_mode, chill_expand_expr, build_chill_floatcall,
build_allocate_getstack, build_max_min, build_chill_function_call,
expand_packed_set, build_compare_set_expr, build_chill_addr_expr,
string_char_rep): Constify a char*.
* gperf (hash, in_word_set): Add prototypes.
* grant.c (newstring, strfree, append, prepend,
grant_use_seizefile, decode_layout, grant_array_type,
grant_array_type_selective, get_tag_value,
get_tag_value_selective, print_enumeral, print_enumeral_selective,
print_integer_type, find_enum_parent, print_integer_selective,
print_struct, print_struct_selective, print_proc_exceptions,
print_proc_tail, print_proc_tail_selective, find_in_decls,
in_ridpointers, grant_seized_identifier, globalize_decl,
grant_one_decl_selective, compare_memory_file, search_in_list,
really_grant_this): Add static prototypes.
(newstring, append, prepend, grant_use_seizefile,
print_integer_type, decode_constant, grant_one_decl_selective,
header_template): Constify a char *.
* inout.c (add_enum_to_list, build_chill_io_list_type,
build_io_types, declare_predefined_file, build_access_part,
textlocation_mode, check_assoc, assoc_call, check_transfer,
connect_process_optionals, connect_text, connect_access,
check_access, check_text, get_final_type_and_range,
process_io_list, check_format_string, get_max_size,
check_exprlist): Add static prototypes.
(declare_predefined_file, check_assoc, assoc_call, check_transfer,
check_access, check_text, process_io_list): Constify a char*.
* lang.c (deep_const_expr, chill_print_error_function): Add static
prototypes.
* lex.c (close_input_file, maybe_number, string_or_char): Constify
a char*.
(ch_lex_init, skip_directive, same_file, getlc, yywrap,
yy_refill): Add static prototypes.
(build_chill_string, same_file, register_seize_path): Constify a
char*.
* lex.h (finish_chill_seizes): Remove unused prototypes.
* loop.c (build_temporary_variable, maybe_make_for_temp,
get_unique_identifier): Constify a char*.
* parse.c (ch_parse_init, check_end_label, end_function,
build_prefix_clause, PEEK_TOKEN, peek_token_, pushback_token,
forward_token_, require, check_token, expect, define__PROCNAME__):
Add static prototypes.
(build_prefix_clause, expect): Constify a char*.
(parse_expression, parse_primval, parse_untyped_expr,
parse_opt_untyped_expr, parse_opt_actions): Add void prototype
argument.
(parse_opt_name_string, parse_simple_name_string,
parse_name_string, parse_defining_occurrence, parse_name,
parse_optlabel, parse_opt_end_label_semi_colon, parse_modulion,
parse_spec_module, parse_semi_colon,
parse_defining_occurrence_list, parse_mode_definition,
parse_mode_definition_statement, parse_synonym_definition,
parse_synonym_definition_statement, parse_on_exception_list,
parse_on_alternatives, parse_loc_declaration,
parse_declaration_statement, parse_optforbid, parse_postfix,
parse_postfix_list, parse_rename_clauses, parse_opt_prefix_clause,
parse_grant_statement, parse_seize_statement,
parse_param_name_list, parse_param_attr, parse_formpar,
parse_formparlist, parse_opt_result_spec, parse_opt_except,
parse_opt_recursive, parse_procedureattr, parse_proc_body,
parse_procedure_definition, parse_processpar,
parse_processparlist, parse_process_definition,
parse_signal_definition, parse_signal_definition_statement,
parse_then_clause, parse_opt_else_clause, parse_expr_list,
parse_range_list_clause, pushback_paren_expr, parse_case_label,
parse_case_label_list, parse_case_label_specification,
parse_single_dimension_case_action,
parse_multi_dimension_case_action, parse_case_action,
parse_asm_operands, parse_asm_clobbers, ch_expand_asm_operands,
parse_asm_action, parse_begin_end_block, parse_if_action,
parse_iteration, parse_delay_case_event_list,
parse_delay_case_action, parse_do_action, parse_receive_spec,
parse_receive_case_action, parse_send_action, parse_start_action,
parse_call, parse_tuple_fieldname_list, parse_tuple_element,
parse_opt_element_list, parse_tuple, parse_operand6,
parse_operand5, parse_operand4, parse_operand3, parse_operand2,
parse_operand1, parse_operand0, parse_case_expression,
parse_then_alternative, parse_else_alternative,
parse_if_expression, parse_index_mode, parse_set_mode, parse_pos,
parse_step, parse_opt_layout, parse_field_name_list,
parse_fixed_field, parse_variant_field_list,
parse_variant_alternative, parse_field, parse_structure_mode,
parse_opt_queue_size, parse_procedure_mode, parse_program,
parse_pass_1_2): Add static prototypes.
(parse_process_definition): Remove extra argument in function call.
(parse_range_list_clause): Likewise.
* satisfy.c (satisfy, cycle_error_print, safe_satisfy_decl,
satisfy_list, satisfy_list_values): Add static prototype.
(safe_satisfy_decl): Cast DECL_TASKING_CODE_DECL() to (tree).
* tasking.c (make_process_struct): Remove unused prototype.
(validate_process_parameters, get_struct_variable_name,
decl_tasking_code_variable, get_struct_debug_type_name,
get_process_wrapper_name, build_tasking_enum,
build_tasking_message_type, build_receive_signal_case_label,
build_receive_buffer_case_label, build_receive_buffer_case_end,
build_receive_signal_case_end): Add static prototypes.
(struct_name, struct_debug_name, data_name, wrapper_name,
get_struct_type_name, get_struct_debug_type_name,
get_tasking_code_name, get_struct_variable_name,
get_process_wrapper_name): Constify a char*.
(validate_process_parameters, get_struct_variable_name,
decl_tasking_code_variable): Hide unused functions.
(build_start_process, add_taskstuff_to_list, build_queue_length):
Constify a char*.
* tree.c (make_powerset_type): Add static prototype.
(get_identifier3, build_alias_decl, decl_check_rename): Constify a
char*.
* typeck.c (extract_constant_from_buffer,
expand_constant_to_buffer, build_empty_string,
make_chill_pointer_type, make_chill_range_type,
apply_chill_array_layout, field_decl_cmp, make_chill_struct_type,
apply_chill_field_layout): Add static prototype.
(valid_array_index_p, extract_constant_from_buffer,
chill_expand_tuple): Constify a char*.
(layout_chill_struct_type): Cast the function argument of qsort.
From-SVN: r28965
+1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * Makefile.in (ch-version.c): Constify a char*.
+
+ * actions.c (id_cmp, warn_unhandled, adjust_return_value,
+ update_else_range_for_int_const, update_else_range_for_range,
+ update_else_range_for_range_expr, update_else_range_for_type,
+ compute_else_range, check_case_value,
+ chill_handle_case_label_range,
+ chill_handle_multi_case_label_range,
+ chill_handle_multi_case_else_label, chill_handle_multi_case_label,
+ chill_handle_multi_case_label_list print_missing_cases): Add
+ static prototypes.
+ (build_exception_variant): Cast the function argument of qsort.
+ (build_rts_call, warn_unhandled, chill_convert_for_assignment,
+ adjust_return_value, chill_expand_result,
+ build_multi_case_selector_expression, print_missing_cases):
+ Constify a char*.
+ (print_missing_cases): Introduce an intermediary non-const ptr.
+ Add brackets and indent.
+
+ * ch-tree.h (maybe_building_objc_message_expr,
+ maybe_objc_comptypes, comptypes_record_hook): Remove declarations.
+ (push_handler, pop_handler): Add prototypes.
+ (builtin_function, valid_array_index_p,
+ build_chill_exception_decl, build_rts_call,
+ chill_convert_for_assignment, display_int_cst,
+ build_chill_addr_expr, check_have_mode, get_identifier3,
+ build_chill_string, register_seize_path, get_unique_identifier,
+ add_taskstuff_to_list, gnuchill_version): Constify a char*.
+ (finish_chill_function): Add void prototype argument.
+
+ * convert.c (convert_to_reference, convert_to_boolean,
+ convert_to_char, base_type_size_in_bytes, remove_tree_element,
+ check_ps_range, digest_powerset_tuple, digest_structure_tuple,
+ digest_array_tuple, convert1): Add static prototypes.
+ (base_type_size_in_bytes): Hide unused function.
+ (display_int_cst, digest_array_tuple): Constify a char*.
+
+ * decl.c (set_nesting_level, make_chill_variants, fix_identifier,
+ proclaim_decl, maybe_acons, push_scope_decls, pop_scope_decls,
+ build_implied_names, bind_sub_modules, layout_array_type,
+ do_based_decl, handle_one_level, label_value_cmp,
+ find_implied_types): Add static prototypes.
+ (boolean_code_name, chill_tree_code_type, chill_tree_code_name):
+ Constify a char*.
+ (layout_chill_variants): Cast the function argument of qsort.
+ (start_chill_function, fix_identifier, init_decl_processing):
+ Constify a char*.
+ (init_decl_processing): Prefer memcpy over bcopy to avoid casts.
+ Use xcalloc instead of xmalloc/bzero.
+ (builtin_function, build_chill_exception_decl,
+ finish_outer_function): Constify a char*.
+
+ * except.c (start_handler_array, finish_handler_array): Add static
+ prototypes.
+
+ * expr.c (chill_expand_expr, chill_expand_case_expr,
+ check_arglist_length, internal_build_compound_expr,
+ is_really_instance, invalid_operand, invalid_right_operand,
+ build_chill_abstime, build_allocate_memory_call,
+ build_allocate_global_memory_call, build_return_memory,
+ build_chill_duration, build_chill_floatcall,
+ build_allocate_getstack, build_chill_allocate,
+ build_chill_getstack, build_chill_terminate, build_chill_inttime,
+ build_chill_lower_or_upper, build_max_min,
+ build_chill_pred_or_succ, expand_packed_set, fold_set_expr,
+ build_compare_set_expr, scalar_to_string, build_concat_expr,
+ build_compare_string_expr, compare_records, string_char_rep,
+ build_boring_bitstring): Add static prototypes.
+ (check_have_mode, chill_expand_expr, build_chill_floatcall,
+ build_allocate_getstack, build_max_min, build_chill_function_call,
+ expand_packed_set, build_compare_set_expr, build_chill_addr_expr,
+ string_char_rep): Constify a char*.
+
+ * gperf (hash, in_word_set): Add prototypes.
+
+ * grant.c (newstring, strfree, append, prepend,
+ grant_use_seizefile, decode_layout, grant_array_type,
+ grant_array_type_selective, get_tag_value,
+ get_tag_value_selective, print_enumeral, print_enumeral_selective,
+ print_integer_type, find_enum_parent, print_integer_selective,
+ print_struct, print_struct_selective, print_proc_exceptions,
+ print_proc_tail, print_proc_tail_selective, find_in_decls,
+ in_ridpointers, grant_seized_identifier, globalize_decl,
+ grant_one_decl_selective, compare_memory_file, search_in_list,
+ really_grant_this): Add static prototypes.
+ (newstring, append, prepend, grant_use_seizefile,
+ print_integer_type, decode_constant, grant_one_decl_selective,
+ header_template): Constify a char *.
+
+ * inout.c (add_enum_to_list, build_chill_io_list_type,
+ build_io_types, declare_predefined_file, build_access_part,
+ textlocation_mode, check_assoc, assoc_call, check_transfer,
+ connect_process_optionals, connect_text, connect_access,
+ check_access, check_text, get_final_type_and_range,
+ process_io_list, check_format_string, get_max_size,
+ check_exprlist): Add static prototypes.
+ (declare_predefined_file, check_assoc, assoc_call, check_transfer,
+ check_access, check_text, process_io_list): Constify a char*.
+
+ * lang.c (deep_const_expr, chill_print_error_function): Add static
+ prototypes.
+
+ * lex.c (close_input_file, maybe_number, string_or_char): Constify
+ a char*.
+ (ch_lex_init, skip_directive, same_file, getlc, yywrap,
+ yy_refill): Add static prototypes.
+ (build_chill_string, same_file, register_seize_path): Constify a
+ char*.
+
+ * lex.h (finish_chill_seizes): Remove unused prototypes.
+
+ * loop.c (build_temporary_variable, maybe_make_for_temp,
+ get_unique_identifier): Constify a char*.
+
+ * parse.c (ch_parse_init, check_end_label, end_function,
+ build_prefix_clause, PEEK_TOKEN, peek_token_, pushback_token,
+ forward_token_, require, check_token, expect, define__PROCNAME__):
+ Add static prototypes.
+ (build_prefix_clause, expect): Constify a char*.
+ (parse_expression, parse_primval, parse_untyped_expr,
+ parse_opt_untyped_expr, parse_opt_actions): Add void prototype
+ argument.
+ (parse_opt_name_string, parse_simple_name_string,
+ parse_name_string, parse_defining_occurrence, parse_name,
+ parse_optlabel, parse_opt_end_label_semi_colon, parse_modulion,
+ parse_spec_module, parse_semi_colon,
+ parse_defining_occurrence_list, parse_mode_definition,
+ parse_mode_definition_statement, parse_synonym_definition,
+ parse_synonym_definition_statement, parse_on_exception_list,
+ parse_on_alternatives, parse_loc_declaration,
+ parse_declaration_statement, parse_optforbid, parse_postfix,
+ parse_postfix_list, parse_rename_clauses, parse_opt_prefix_clause,
+ parse_grant_statement, parse_seize_statement,
+ parse_param_name_list, parse_param_attr, parse_formpar,
+ parse_formparlist, parse_opt_result_spec, parse_opt_except,
+ parse_opt_recursive, parse_procedureattr, parse_proc_body,
+ parse_procedure_definition, parse_processpar,
+ parse_processparlist, parse_process_definition,
+ parse_signal_definition, parse_signal_definition_statement,
+ parse_then_clause, parse_opt_else_clause, parse_expr_list,
+ parse_range_list_clause, pushback_paren_expr, parse_case_label,
+ parse_case_label_list, parse_case_label_specification,
+ parse_single_dimension_case_action,
+ parse_multi_dimension_case_action, parse_case_action,
+ parse_asm_operands, parse_asm_clobbers, ch_expand_asm_operands,
+ parse_asm_action, parse_begin_end_block, parse_if_action,
+ parse_iteration, parse_delay_case_event_list,
+ parse_delay_case_action, parse_do_action, parse_receive_spec,
+ parse_receive_case_action, parse_send_action, parse_start_action,
+ parse_call, parse_tuple_fieldname_list, parse_tuple_element,
+ parse_opt_element_list, parse_tuple, parse_operand6,
+ parse_operand5, parse_operand4, parse_operand3, parse_operand2,
+ parse_operand1, parse_operand0, parse_case_expression,
+ parse_then_alternative, parse_else_alternative,
+ parse_if_expression, parse_index_mode, parse_set_mode, parse_pos,
+ parse_step, parse_opt_layout, parse_field_name_list,
+ parse_fixed_field, parse_variant_field_list,
+ parse_variant_alternative, parse_field, parse_structure_mode,
+ parse_opt_queue_size, parse_procedure_mode, parse_program,
+ parse_pass_1_2): Add static prototypes.
+ (parse_process_definition): Remove extra argument in function call.
+ (parse_range_list_clause): Likewise.
+
+ * satisfy.c (satisfy, cycle_error_print, safe_satisfy_decl,
+ satisfy_list, satisfy_list_values): Add static prototype.
+ (safe_satisfy_decl): Cast DECL_TASKING_CODE_DECL() to (tree).
+
+ * tasking.c (make_process_struct): Remove unused prototype.
+ (validate_process_parameters, get_struct_variable_name,
+ decl_tasking_code_variable, get_struct_debug_type_name,
+ get_process_wrapper_name, build_tasking_enum,
+ build_tasking_message_type, build_receive_signal_case_label,
+ build_receive_buffer_case_label, build_receive_buffer_case_end,
+ build_receive_signal_case_end): Add static prototypes.
+ (struct_name, struct_debug_name, data_name, wrapper_name,
+ get_struct_type_name, get_struct_debug_type_name,
+ get_tasking_code_name, get_struct_variable_name,
+ get_process_wrapper_name): Constify a char*.
+ (validate_process_parameters, get_struct_variable_name,
+ decl_tasking_code_variable): Hide unused functions.
+ (build_start_process, add_taskstuff_to_list, build_queue_length):
+ Constify a char*.
+
+ * tree.c (make_powerset_type): Add static prototype.
+ (get_identifier3, build_alias_decl, decl_check_rename): Constify a
+ char*.
+
+ * typeck.c (extract_constant_from_buffer,
+ expand_constant_to_buffer, build_empty_string,
+ make_chill_pointer_type, make_chill_range_type,
+ apply_chill_array_layout, field_decl_cmp, make_chill_struct_type,
+ apply_chill_field_layout): Add static prototype.
+ (valid_array_index_p, extract_constant_from_buffer,
+ chill_expand_tuple): Constify a char*.
+ (layout_chill_struct_type): Cast the function argument of qsort.
+
1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* actions.c (lang_identify): Constify a char*.
$(srcdir)/../system.h $(srcdir)/../toplev.h
ch-version.o : ch-version.c
ch-version.c : Makefile
- echo 'char *gnuchill_version = "$(GNUCHILL_VERSION)";' > $@
+ echo 'const char * const gnuchill_version = "$(GNUCHILL_VERSION)";' > $@
## This is ugly, but I don't want GNU make to put these variables in
## the environment. Older makes will see this as a set of targets
#include "assert.h"
#include "toplev.h"
+static int id_cmp PROTO ((tree *, tree *));
+static void warn_unhandled PROTO ((const char *));
+static tree adjust_return_value PROTO ((tree, const char *));
+static tree update_else_range_for_int_const PROTO ((tree, tree));
+static tree update_else_range_for_range PROTO ((tree, tree, tree));
+static tree update_else_range_for_range_expr PROTO ((tree, tree));
+static tree update_else_range_for_type PROTO ((tree, tree));
+static tree compute_else_range PROTO ((tree, tree, int));
+static tree check_case_value PROTO ((tree, tree));
+static void chill_handle_case_label_range PROTO ((tree, tree, tree));
+static tree chill_handle_multi_case_label_range PROTO ((tree, tree, tree));
+static tree chill_handle_multi_case_else_label PROTO ((tree));
+static tree chill_handle_multi_case_label PROTO ((tree, tree));
+static tree chill_handle_multi_case_label_list PROTO ((tree, tree));
+static void print_missing_cases PROTO ((tree, const unsigned char *, long));
+
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
a[i] = t;
/* NULL terminator for list. */
a[i] = NULL_TREE;
- qsort (a, i, sizeof (tree), id_cmp);
+ qsort (a, i, sizeof (tree),
+ (int (*) PROTO((const void*, const void*))) id_cmp);
while (i--)
TREE_CHAIN (a[i]) = a[i+1];
raises = a[0];
\f
tree
build_rts_call (name, type, args)
- char *name;
+ const char *name;
tree type, args;
{
tree decl = lookup_name (get_identifier (name));
static void
warn_unhandled (ex)
- char *ex;
+ const char *ex;
{
struct already_type *p = already_warned;
tree
chill_convert_for_assignment (type, expr, place)
tree type, expr;
- char *place; /* location description for error messages */
+ const char *place; /* location description for error messages */
{
tree ttype = type;
tree etype = TREE_TYPE (expr);
static tree
adjust_return_value (expr, action)
tree expr;
- char *action;
+ const char *action;
{
tree type = TREE_TYPE (TREE_TYPE (current_function_decl));
int result_or_return;
{
tree type;
- char *action_name = result_or_return ? "RESULT" : "RETURN";
+ const char *action_name = result_or_return ? "RESULT" : "RETURN";
if (pass == 1)
return;
static void
print_missing_cases (type, cases_seen, count)
tree type;
- unsigned char *cases_seen;
+ const unsigned char *cases_seen;
long count;
{
long i;
long x = i;
long j;
tree t = type;
- char *err_val_name = "???";
+ const char *err_val_name = "???";
if (TYPE_MIN_VALUE (t)
&& TREE_CODE (TYPE_MIN_VALUE (t)) == INTEGER_CST)
x += TREE_INT_CST_LOW (TYPE_MIN_VALUE (t));
err_val_name = x ? "TRUE" : "FALSE";
break;
case CHAR_TYPE:
- if ((x >= ' ' && x < 127) && x != '\'' && x != '^')
- sprintf (buf, "'%c'", (char)x);
- else
- sprintf (buf, "'^(%ld)'", x);
- err_val_name = buf;
- j = i;
- while (j < count && !BITARRAY_TEST(cases_seen, j))
- j++;
- if (j > i + 1)
- {
- long y = x+j-i-1;
- err_val_name += strlen (err_val_name);
- if ((y >= ' ' && y < 127) && y != '\'' && y != '^')
- sprintf (err_val_name, "%s:'%c'", buf, (char)y);
- else
- sprintf (err_val_name, "%s:'^(%ld)'", buf, y);
- i = j - 1;
- }
+ {
+ char *bufptr;
+ if ((x >= ' ' && x < 127) && x != '\'' && x != '^')
+ sprintf (buf, "'%c'", (char)x);
+ else
+ sprintf (buf, "'^(%ld)'", x);
+ bufptr = buf;
+ j = i;
+ while (j < count && !BITARRAY_TEST(cases_seen, j))
+ j++;
+ if (j > i + 1)
+ {
+ long y = x+j-i-1;
+ bufptr += strlen (bufptr);
+ if ((y >= ' ' && y < 127) && y != '\'' && y != '^')
+ sprintf (bufptr, "%s:'%c'", buf, (char)y);
+ else
+ sprintf (bufptr, "%s:'^(%ld)'", buf, y);
+ i = j - 1;
+ }
+ err_val_name = bufptr;
+ }
break;
case ENUMERAL_TYPE:
for (v = TYPE_VALUES (t); v && x; v = TREE_CHAIN (v))
#define CH_REFERABLE(EXPR) chill_referable(EXPR)
#define CH_LOCATION_P(EXPR) chill_location (EXPR)
\f
-extern int maybe_objc_comptypes ();
-extern tree maybe_building_objc_message_expr ();
-\f
/* Standard named or nameless data types of the C compiler. */
/* Nonzero means `$' can be in an identifier. */
extern int warn_parentheses;
-/* Nonzero means this is a function to call to perform comptypes
- on two record types. */
-
-extern int (*comptypes_record_hook) ();
-
/* Nonzero means we are reading code that came from a system header file. */
extern int system_header_p;
/* in except.c */
extern void except_init_pass_2 PROTO((void));
+extern void push_handler PROTO((void));
+extern void pop_handler PROTO((int));
/* in ch-loop.c */
extern int flag_local_loop_counter;
extern void nonvalue_end_loop_scope PROTO((void));
extern tree build_enumerator PROTO((tree, tree));
-extern tree builtin_function PROTO((char *, tree, enum built_in_function function_, char *));
+extern tree builtin_function PROTO((const char *, tree, enum built_in_function function_, const char *));
extern tree c_build_type_variant PROTO((tree, int, int));
extern int c_decode_option PROTO((int, char **));
extern void c_mark_varargs PROTO((void));
extern void set_init_label PROTO((tree));
extern void start_init PROTO((tree, tree, int));
extern void store_init_value PROTO((tree, tree));
-extern tree valid_array_index_p PROTO((tree, tree, char *, int));
+extern tree valid_array_index_p PROTO((tree, tree, const char *, int));
/* in ch/actions.c */
extern int grant_only_flag;
extern tree build_chill_card PROTO((tree));
extern tree build_chill_case_expr PROTO((tree, tree, tree));
extern tree build_cause_exception PROTO((tree, int));
-extern tree build_chill_exception_decl PROTO((char *));
+extern tree build_chill_exception_decl PROTO((const char *));
extern tree build_chill_function_call PROTO((tree, tree));
extern tree build_chill_length PROTO((tree));
extern tree build_chill_indirect_ref PROTO((tree, tree, int));
extern tree build_exception_variant PROTO((tree, tree));
extern tree build_generalized_call PROTO((tree, tree));
extern tree build_lang_decl PROTO((enum chill_tree_code, tree, tree));
-extern tree build_rts_call PROTO((char *, tree, tree));
+extern tree build_rts_call PROTO((const char *, tree, tree));
extern tree build_varying_struct PROTO((tree));
extern void chill_check_decl PROTO((tree));
-extern tree chill_convert_for_assignment PROTO((tree, tree, char*));
+extern tree chill_convert_for_assignment PROTO((tree, tree, const char *));
extern void chill_expand_return PROTO((tree, int));
extern void chill_expand_result PROTO((tree, int));
extern void chill_handle_case_default PROTO((void));
extern tree convert PROTO((tree, tree));
extern tree convert_from_reference PROTO((tree));
extern tree convert_to_class PROTO((ch_class, tree));
-extern char* display_int_cst PROTO((tree));
+extern const char *display_int_cst PROTO((tree));
/* in ch/decl.c */
extern tree build_enumerator PROTO((tree, tree));
extern void do_decls PROTO((tree, tree, int, int, tree, int));
extern void expand_chill_outparms PROTO((void));
extern void find_granted_decls PROTO((void));
-extern void finish_chill_function PROTO(());
+extern void finish_chill_function PROTO((void));
extern tree finish_enum PROTO((tree, tree));
extern void fixup_chill_parms PROTO((tree));
extern void finish_outer_function PROTO((void));
extern int is_handled PROTO((tree));
/* in ch/expr.c */
-extern tree build_chill_addr_expr PROTO((tree, char *));
+extern tree build_chill_addr_expr PROTO((tree, const char *));
extern tree build_chill_arrow_expr PROTO((tree, int));
extern tree build_component_ref PROTO((tree, tree));
extern tree build_chill_compound_expr PROTO((tree));
tree, tree));
extern tree check_case_selector PROTO((tree));
extern tree check_case_selector_list PROTO((tree));
-extern tree check_have_mode PROTO((tree, char*));
+extern tree check_have_mode PROTO((tree, const char *));
extern void init_chill_expand PROTO((void));
extern void chill_expand_assignment PROTO((tree, enum chill_tree_code, tree));
extern void expand_assignment_action PROTO((tree, enum chill_tree_code, tree));
extern tree build_chill_reference_type PROTO((tree));
extern tree build_simple_array_type PROTO((tree, tree, tree));
extern tree const_expr PROTO((tree));
-extern tree get_identifier3 PROTO((char*, char*, char*));
+extern tree get_identifier3 PROTO((const char *, const char *, const char *));
extern tree layout_chill_array_type PROTO((tree));
extern tree layout_chill_range_type PROTO((tree, int));
extern tree layout_chill_pointer_type PROTO((tree));
/* in ch/lex.l */
extern tree use_seizefile_name;
extern tree current_seizefile_name;
-extern tree build_chill_string PROTO((int, char *));
+extern tree build_chill_string PROTO((int, const char *));
extern int check_newline PROTO((void));
extern tree get_chill_filename PROTO((void));
extern tree get_chill_linenumber PROTO((void));
-extern void register_seize_path PROTO((char *));
+extern void register_seize_path PROTO((const char *));
extern void reinit_parse_for_function PROTO((void));
extern void mark_use_seizefile_written PROTO((tree));
extern void begin_chill_loop PROTO((tree, tree));
extern tree build_chill_iterator PROTO((tree, tree, tree, int, int, int));
extern void end_chill_loop PROTO((void));
-extern tree get_unique_identifier PROTO((char *));
+extern tree get_unique_identifier PROTO((const char *));
/* in ch/inout.c */
extern tree access_recordmode PROTO((tree));
extern tree satisfy_decl PROTO((tree, int));
/* in ch/tasking.c */
-extern void add_taskstuff_to_list PROTO((tree, char *, tree, tree, tree));
+extern void add_taskstuff_to_list PROTO((tree, const char *, tree, tree, tree));
extern void process_buffer_decls PROTO((tree, tree, int));
extern tree buffer_element_mode PROTO((tree));
extern void invalidate_buffer_element_mode PROTO((tree));
/* fold a tree to constant as much as possible */
extern tree deep_fold PROTO((tree));
+
+extern const char * const gnuchill_version;
+
#endif
extern tree bit_one_node, bit_zero_node;
extern tree string_one_type_node;
extern tree bitstring_one_type_node;
+
+static tree convert_to_reference PROTO ((tree, tree));
+static tree convert_to_boolean PROTO ((tree, tree));
+static tree convert_to_char PROTO ((tree, tree));
+#if 0
+static tree base_type_size_in_bytes PROTO ((tree));
+#endif
+static tree remove_tree_element PROTO ((tree, tree *));
+static tree check_ps_range PROTO ((tree, tree, tree));
+static tree digest_powerset_tuple PROTO ((tree, tree));
+static tree digest_structure_tuple PROTO ((tree, tree));
+static tree digest_array_tuple PROTO ((tree, tree, int));
+static tree convert1 PROTO ((tree, tree));
\f
static tree
convert_to_reference (reftype, expr)
}
}
\f
-tree
+#if 0
+static tree
base_type_size_in_bytes (type)
tree type;
{
return error_mark_node;
return size_in_bytes (TREE_TYPE (type));
}
+#endif
/*
* build a singleton array type, of TYPE objects.
/* Return a Chill representation of the INTEGER_CST VAL.
The result may be in a static buffer, */
-char *
+const char *
display_int_cst (val)
tree val;
{
if (! CH_COMPATIBLE (value, element_type))
{
- char *err_val_name = first ? display_int_cst (first) : "(default)";
+ const char *err_val_name =
+ first ? display_int_cst (first) : "(default)";
error ("incompatible array tuple element %s", err_val_name);
value = error_mark_node;
}
ptr = &TREE_CHAIN (*ptr);
if (*ptr && ! tree_int_cst_lt (CONSTRUCTOR_ELT_HI (*ptr), first))
{
- char *err_val_name = display_int_cst (first);
+ const char *err_val_name = display_int_cst (first);
error ("array tuple has duplicate index %s", err_val_name);
errors++;
continue;
}
else
{
- char *err_val_name = display_int_cst (first);
+ const char *err_val_name = display_int_cst (first);
if (TREE_CODE (last) != INTEGER_CST)
error ("dynamic array tuple without (*) or (ELSE)");
else if (tree_int_cst_equal (first, last))
static void pushdecllist PROTO((tree, int));
static int init_nonvalue_struct PROTO((tree));
static int init_nonvalue_array PROTO((tree));
+static void set_nesting_level PROTO((tree, int));
+static tree make_chill_variants PROTO((tree, tree, tree));
+static tree fix_identifier PROTO((tree));
+static void proclaim_decl PROTO((tree, int));
+static tree maybe_acons PROTO((tree, tree));
+static void push_scope_decls PROTO((int));
+static void pop_scope_decls PROTO((tree, tree));
+static tree build_implied_names PROTO((tree));
+static void bind_sub_modules PROTO((int));
+static void layout_array_type PROTO((tree));
+static void do_based_decl PROTO((tree, tree, tree));
+static void handle_one_level PROTO((tree, tree));
int current_nesting_level = BUILTIN_NESTING_LEVEL;
int current_module_nesting_level = 0;
tree int_ftype_cptr_cptr_sizet;
#endif
-char **boolean_code_name;
+const char **boolean_code_name;
/* Two expressions that are constants with value zero.
The first is of type `int', the second of type `void *'. */
#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE,
- char chill_tree_code_type[] = {
+ const char chill_tree_code_type[] = {
'x',
#include "ch-tree.def"
};
Used for printing out the tree and error messages. */
#define DEFTREECODE(SYM, NAME, TYPE, LEN) NAME,
-char *chill_tree_code_name[] = {
+const char *chill_tree_code_name[] = {
"@@dummy",
#include "ch-tree.def"
};
\f
/* This excessive piece of code sets DECL_NESTING_LEVEL (DECL) to LEVEL. */
-void
+static void
set_nesting_level (decl, level)
tree decl;
int level;
tree decl;
};
+static int label_value_cmp PROTO((struct tree_pair *,
+ struct tree_pair *));
/* Function to help qsort sort variant labels by value order. */
static int
return TREE_INT_CST_LOW (x->value) - TREE_INT_CST_LOW (y->value);
}
\f
-tree
+static tree
make_chill_variants (tagfields, body, variantelse)
tree tagfields;
tree body;
{
int limit;
qsort (label_value_array,
- label_index, sizeof (struct tree_pair), label_value_cmp);
+ label_index, sizeof (struct tree_pair),
+ (int (*) PROTO ((const void *, const void *))) label_value_cmp);
limit = label_index - 1;
for (label_index = 0; label_index < limit; label_index++)
{
{
/* We use the same name as the keyword.
This makes it easy to print and change the RESULT from gdb. */
- char *result_str = (ignore_case || ! special_UC) ? "result" : "RESULT";
+ const char *result_str =
+ (ignore_case || ! special_UC) ? "result" : "RESULT";
if (pass == 2 && TREE_CODE (result_type) == ERROR_MARK)
TREE_TYPE (current_scope->remembered_decls) = result_type;
chill_result_decl = do_decl (get_identifier (result_str),
return name; /* may have generated a name */
}
/* Make a copy of the identifier NAME, replacing each '!' by '__'. */
-tree
+static tree
fix_identifier (name)
tree name;
{
char *buf = (char*)alloca (2 * IDENTIFIER_LENGTH (name) + 1);
int fixed = 0;
register char *dptr = buf;
- register char *sptr = IDENTIFIER_POINTER (name);
+ register const char *sptr = IDENTIFIER_POINTER (name);
for (; *sptr; sptr++)
{
if (*sptr == '!')
Check redefinitions at the same level.
Suppress error messages if QUIET is true. */
-void
+static void
proclaim_decl (decl, quiet)
tree decl;
int quiet;
struct path *prev;
tree node;
};
+
+static tree find_implied_types PROTO((tree, struct path *, tree));
\f
/* Look for implied types (enumeral types) implied by TYPE (a decl or type).
Add these to list.
Use old_path to guard against cycles. */
-tree
+static tree
find_implied_types (type, old_path, list)
tree type;
struct path *old_path;
sizetype = long_unsigned_type_node;
#else
{
- char *size_type_c_name = SIZE_TYPE;
+ const char *size_type_c_name = SIZE_TYPE;
if (strncmp (size_type_c_name, "long long ", 10) == 0)
sizetype = long_long_unsigned_type_node;
else if (strncmp (size_type_c_name, "long ", 5) == 0)
DECL_SOURCE_LINE (temp) = 0;
initializer_type = TREE_TYPE (temp);
- bcopy (chill_tree_code_type,
- tree_code_type + (int) LAST_AND_UNUSED_TREE_CODE,
- (((int) LAST_CHILL_TREE_CODE - (int) LAST_AND_UNUSED_TREE_CODE)
- * sizeof (char)));
- bcopy ((char *) chill_tree_code_length,
- (char *) (tree_code_length + (int) LAST_AND_UNUSED_TREE_CODE),
- (((int) LAST_CHILL_TREE_CODE - (int) LAST_AND_UNUSED_TREE_CODE)
- * sizeof (int)));
- bcopy ((char *) chill_tree_code_name,
- (char *) (tree_code_name + (int) LAST_AND_UNUSED_TREE_CODE),
- (((int) LAST_CHILL_TREE_CODE - (int) LAST_AND_UNUSED_TREE_CODE)
- * sizeof (char *)));
- boolean_code_name = (char **) xmalloc (sizeof (char *) * (int) LAST_CHILL_TREE_CODE);
- bzero ((char *) boolean_code_name, sizeof (char *) * (int) LAST_CHILL_TREE_CODE);
+ memcpy (tree_code_type + (int) LAST_AND_UNUSED_TREE_CODE,
+ chill_tree_code_type,
+ (((int) LAST_CHILL_TREE_CODE - (int) LAST_AND_UNUSED_TREE_CODE)
+ * sizeof (char)));
+ memcpy (tree_code_length + (int) LAST_AND_UNUSED_TREE_CODE,
+ chill_tree_code_length,
+ (((int) LAST_CHILL_TREE_CODE - (int) LAST_AND_UNUSED_TREE_CODE)
+ * sizeof (int)));
+ memcpy (tree_code_name + (int) LAST_AND_UNUSED_TREE_CODE,
+ chill_tree_code_name,
+ (((int) LAST_CHILL_TREE_CODE - (int) LAST_AND_UNUSED_TREE_CODE)
+ * sizeof (char *)));
+ boolean_code_name = (const char **) xcalloc (sizeof (char *),
+ (int) LAST_CHILL_TREE_CODE);
boolean_code_name[EQ_EXPR] = "=";
boolean_code_name[NE_EXPR] = "/=";
tree
builtin_function (name, type, function_code, library_name)
- char *name;
+ const char *name;
tree type;
enum built_in_function function_code;
- char *library_name;
+ const char *library_name;
{
tree decl = build_decl (FUNCTION_DECL, get_identifier (name), type);
DECL_EXTERNAL (decl) = 1;
pushdecllist (alias, 0);
}
-void
+static void
do_based_decl (name, mode, base_var)
tree name, mode, base_var;
{
tree
build_chill_exception_decl (name)
- char *name;
+ const char *name;
{
tree decl, ex_name, ex_init, ex_type;
int name_len = strlen (name);
and fill in the module's function's address. */
extern tree initializer_type;
- char *fname_str = IDENTIFIER_POINTER (DECL_NAME (current_function_decl));
+ const char *fname_str = IDENTIFIER_POINTER (DECL_NAME (current_function_decl));
char *init_entry_name = (char *)xmalloc ((unsigned)(strlen (fname_str) + 20));
tree init_entry_id;
tree init_entry_decl;
static int exceptions_initialized = 0;
static void emit_setup_handler PROTO((void));
static void initialize_exceptions PROTO((void));
+static tree start_handler_array PROTO((void));
+static void finish_handler_array PROTO((void));
static tree char_pointer_type_for_handler;
/* If this is 1, operations to push and pop on the __exceptionStack
#define HOURS_MAX 1193
#define DAYS_MAX 49
-/* forward declaration */
-rtx chill_expand_expr PROTO((tree, rtx, enum machine_mode,
- enum expand_modifier));
+/* forward declarations */
+static rtx chill_expand_expr PROTO ((tree, rtx, enum machine_mode,
+ enum expand_modifier));
+static tree chill_expand_case_expr PROTO ((tree));
+static int check_arglist_length PROTO ((tree, int, int, tree));
+static tree internal_build_compound_expr PROTO ((tree, int));
+static int is_really_instance PROTO ((tree));
+static int invalid_operand PROTO ((enum chill_tree_code,
+ tree, int));
+static int invalid_right_operand PROTO ((enum chill_tree_code, tree));
+static tree build_chill_abstime PROTO ((tree));
+static tree build_allocate_memory_call PROTO ((tree, tree));
+static tree build_allocate_global_memory_call PROTO ((tree, tree));
+static tree build_return_memory PROTO ((tree));
+static tree build_chill_duration PROTO ((tree, unsigned long,
+ tree, unsigned long));
+static tree build_chill_floatcall PROTO ((tree, const char *,
+ const char *));
+static tree build_allocate_getstack PROTO ((tree, tree, const char *,
+ const char *, tree, tree));
+static tree build_chill_allocate PROTO ((tree, tree));
+static tree build_chill_getstack PROTO ((tree, tree));
+static tree build_chill_terminate PROTO ((tree));
+static tree build_chill_inttime PROTO ((tree, tree));
+static tree build_chill_lower_or_upper PROTO ((tree, int));
+static tree build_max_min PROTO ((tree, int));
+static tree build_chill_pred_or_succ PROTO ((tree, enum tree_code));
+static tree expand_packed_set PROTO ((const char *, int, tree));
+static tree fold_set_expr PROTO ((enum chill_tree_code,
+ tree, tree));
+static tree build_compare_set_expr PROTO ((enum tree_code, tree, tree));
+static tree scalar_to_string PROTO ((tree));
+static tree build_concat_expr PROTO ((tree, tree));
+static tree build_compare_string_expr PROTO ((enum tree_code, tree, tree));
+static tree compare_records PROTO ((tree, tree));
+static tree string_char_rep PROTO ((int, tree));
+static tree build_boring_bitstring PROTO ((long, int));
/* variable to hold the type the DESCR built-in returns */
static tree descr_type = NULL_TREE;
tree
check_have_mode (exp, context)
tree exp;
- char *context;
+ const char *context;
{
if (TREE_CODE (exp) != ERROR_MARK && TREE_TYPE (exp) == NULL_TREE)
{
return nreverse(return_list);
}
-tree
+static tree
chill_expand_case_expr (expr)
tree expr;
{
\f
/* Hook used by expand_expr to expand CHILL-specific tree codes. */
-rtx
+static rtx
chill_expand_expr (exp, target, tmode, modifier)
tree exp;
rtx target;
rtx original_target = target;
rtx op0, op1;
int ignore = target == const0_rtx;
- char *lib_func; /* name of library routine */
+ const char *lib_func; /* name of library routine */
if (ignore)
target = 0, original_target = 0;
return temp;
}
-tree
+static tree
build_chill_abstime (exprlist)
tree exprlist;
{
}
-tree
+static tree
build_allocate_memory_call (ptr, size)
tree ptr, size;
{
}
-tree
+static tree
build_allocate_global_memory_call (ptr, size)
tree ptr, size;
{
}
-tree
+static tree
build_return_memory (ptr)
tree ptr;
{
MILLISECS, SECS, MINUTES, HOURS and DAYS.
The built duration value is in milliseconds. */
-tree
+static tree
build_chill_duration (expr, multiplier, fnname, maxvalue)
tree expr;
unsigned long multiplier;
static tree
build_chill_floatcall (expr, chillname, funcname)
tree expr;
- char *chillname;
- char *funcname;
+ const char *chillname;
+ const char *funcname;
{
tree result;
tree type;
build_allocate_getstack (mode, value, chill_name, fnname, filename, linenumber)
tree mode;
tree value;
- char *chill_name;
- char *fnname;
+ const char *chill_name;
+ const char *fnname;
tree filename;
tree linenumber;
{
}
/* process the ALLOCATE built-in */
-tree
+static tree
build_chill_allocate (mode, value)
tree mode;
tree value;
}
/* process the GETSTACK built-in */
-tree
+static tree
build_chill_getstack (mode, value)
tree mode;
tree value;
}
/* process the TERMINATE built-in */
-tree
+static tree
build_chill_terminate (ptr)
tree ptr;
{
satisfy_decl (decl, 0);
}
-tree
+static tree
build_chill_inttime (t, loclist)
tree t, loclist;
{
else
{
tree parmlist, filename, lineno;
- char *funcname;
+ const char *funcname;
/* set up to call appropriate runtime function */
if (max_min)
if (valtail != 0 && TREE_VALUE (valtail) != void_type_node)
{
- char *errstr = "too many arguments to procedure";
+ const char *errstr = "too many arguments to procedure";
if (name)
error ("%s `%s'", errstr, IDENTIFIER_POINTER (name));
else
}
else if (typetail != 0 && TREE_VALUE (typetail) != void_type_node)
{
- char *errstr = "too few arguments to procedure";
+ const char *errstr = "too few arguments to procedure";
if (name)
error ("%s `%s'", errstr, IDENTIFIER_POINTER (name));
else
\f
/* Given a set stored as one bit per char (in BUFFER[0 .. BIT_SIZE-1]),
return a CONTRUCTOR, of type TYPE (a SET_TYPE). */
-tree
+static tree
expand_packed_set (buffer, bit_size, type)
- char *buffer;
+ const char *buffer;
int bit_size;
tree type;
{
tree op0, op1;
{
tree result_type = NULL_TREE;
- char *fnname;
+ const char *fnname;
tree x;
/* These conversions are needed if -fold-strings. */
return build (code, boolean_type_node, op0, op1);
}
-tree
+static tree
compare_records (exp0, exp1)
tree exp0, exp1;
{
tree
build_chill_addr_expr (ref, errormsg)
tree ref;
- char *errormsg;
+ const char *errormsg;
{
if (ref == error_mark_node)
return ref;
/*
* process a string repetition phrase '(' COUNT ')' STRING
*/
-tree
+static tree
string_char_rep (count, string)
int count;
tree string;
int slen, charindx, repcnt;
char ch;
char *temp;
- char *inp;
+ const char *inp;
char *outp;
tree type;
/* Build a bit-string constant containing with the given LENGTH
containing all ones (if VALUE is true), or all zeros (if VALUE is false). */
-tree
+static tree
build_boring_bitstring (length, value)
long length;
int value;
enum toktype { RESERVED, DIRECTIVE, PREDEF } flags;
};
extern tree ridpointers [];
+#ifdef __GNUC__
+__inline
+#endif
+static unsigned int hash PARAMS ((const char *, unsigned int));
+#ifdef __GNUC__
+__inline
+#endif
+struct resword *in_word_set PARAMS ((const char *, unsigned int));
%%
access, ACCESS, NORID, RESERVED
after, AFTER, NORID, RESERVED
static int spec_module_generated = 0;
/* define version strings */
-extern char *gnuchill_version;
extern char *version_string;
/* define a faster string handling */
static MYSTRING *decode_mode_selective PROTO((tree, tree));
static MYSTRING *get_type_selective PROTO((tree, tree));
static MYSTRING *decode_decl_selective PROTO((tree, tree));
+static MYSTRING *newstring PROTO((const char *));
+static void strfree PROTO((MYSTRING *));
+static MYSTRING *append PROTO((MYSTRING *, const char *));
+static MYSTRING *prepend PROTO((MYSTRING *, const char *));
+static void grant_use_seizefile PROTO((const char *));
+static MYSTRING *decode_layout PROTO((tree));
+static MYSTRING *grant_array_type PROTO((tree));
+static MYSTRING *grant_array_type_selective PROTO((tree, tree));
+static MYSTRING *get_tag_value PROTO((tree));
+static MYSTRING *get_tag_value_selective PROTO((tree, tree));
+static MYSTRING *print_enumeral PROTO((tree));
+static MYSTRING *print_enumeral_selective PROTO((tree, tree));
+static MYSTRING *print_integer_type PROTO((tree));
+static tree find_enum_parent PROTO((tree, tree));
+static MYSTRING *print_integer_selective PROTO((tree, tree));
+static MYSTRING *print_struct PROTO((tree));
+static MYSTRING *print_struct_selective PROTO((tree, tree));
+static MYSTRING *print_proc_exceptions PROTO((tree));
+static MYSTRING *print_proc_tail PROTO((tree, tree, int));
+static MYSTRING *print_proc_tail_selective PROTO((tree, tree, tree));
+static tree find_in_decls PROTO((tree, tree));
+static int in_ridpointers PROTO((tree));
+static void grant_seized_identifier PROTO((tree));
+static void globalize_decl PROTO((tree));
+static void grant_one_decl_selective PROTO((tree, tree));
+static int compare_memory_file PROTO((const char *, const char *));
+static int search_in_list PROTO((tree, tree));
+static int really_grant_this PROTO((tree, tree));
/* list of the VAR_DECLs of the module initializer entries */
tree module_init_list = NULL_TREE;
\f
static MYSTRING *
newstring (str)
- char *str;
+ const char *str;
{
MYSTRING *tmp = (MYSTRING *) xmalloc (sizeof (MYSTRING));
unsigned len = strlen (str);
static MYSTRING *
append (inout, in)
MYSTRING *inout;
- char *in;
+ const char *in;
{
int inlen = strlen (in);
int amount = ALLOCAMOUNT;
static MYSTRING *
prepend (inout, in)
MYSTRING *inout;
- char *in;
+ const char *in;
{
MYSTRING *res = inout;
if (strlen (in))
return res;
}
\f
-void
+static void
grant_use_seizefile (seize_filename)
- char *seize_filename;
+ const char *seize_filename;
{
APPEND (gstring, "<> USE_SEIZE_FILE \"");
APPEND (gstring, seize_filename);
{
MYSTRING *result = newstring ("");
MYSTRING *mode_string;
- char *name_ptr;
+ const char *name_ptr;
tree base_type;
if (TREE_TYPE (type))
MYSTRING *tmp_string;
tree type = TREE_TYPE (init);
tree val = init;
- char *op;
+ const char *op;
char wrk[256];
MYSTRING *mode_string;
case STRING_CST:
{
- char *ptr = TREE_STRING_POINTER (val);
+ const char *ptr = TREE_STRING_POINTER (val);
int i = TREE_STRING_LENGTH (val);
APPEND (result, "\"");
while (--i >= 0)
static int
compare_memory_file (fname, buf)
- char *fname;
- char *buf;
+ const char *fname;
+ const char *buf;
{
FILE *fb;
int c;
\f
/* Write a SPEC MODULE using the declarations in the list DECLS. */
static int header_written = 0;
-static char *header_template =
+static const char *header_template =
"--\n-- WARNING: this file was generated by\n\
-- GNUCHILL version %s\n-- based on gcc version %s\n--\n";
/* C code produced by gperf version 2.7.1 (19981006 egcs) */
/* Command-line: gperf -L C -F , 0, 0, 0 -D -E -S1 -p -j1 -i 1 -g -o -t -k* gperf.tmp */
struct resword {
- const char *name;
+ const char *name;
short token;
enum rid rid;
enum toktype { RESERVED, DIRECTIVE, PREDEF } flags;
};
extern tree ridpointers [];
+#ifdef __GNUC__
+__inline
+#endif
+static unsigned int hash PARAMS ((const char *, unsigned int));
+#ifdef __GNUC__
+__inline
+#endif
+struct resword *in_word_set PARAMS ((const char *, unsigned int));
/* maximum key range = 2815, duplicates = 6 */
#ifdef __GNUC__
/* set non-zero if special words are to be entered in uppercase */
extern int special_UC;
-static int intsize_of_charsexpr PROTO((tree));
+static int intsize_of_charsexpr PROTO ((tree));
+static tree add_enum_to_list PROTO ((tree, tree));
+static void build_chill_io_list_type PROTO ((void));
+static void build_io_types PROTO ((void));
+static void declare_predefined_file PROTO ((const char *, const char *));
+static tree build_access_part PROTO ((void));
+static tree textlocation_mode PROTO ((tree));
+static int check_assoc PROTO ((tree, int, const char *));
+static tree assoc_call PROTO ((tree, tree, const char *));
+static int check_transfer PROTO ((tree, int, const char *));
+static int connect_process_optionals PROTO ((tree, tree *, tree *, tree));
+static tree connect_text PROTO ((tree, tree, tree, tree));
+static tree connect_access PROTO ((tree, tree, tree, tree));
+static int check_access PROTO ((tree, int, const char *));
+static int check_text PROTO ((tree, int, const char *));
+static tree get_final_type_and_range PROTO ((tree, tree *, tree *));
+static void process_io_list PROTO ((tree, tree *, tree *, rtx *,
+ int, int));
+static void check_format_string PROTO ((tree, tree, int));
+static int get_max_size PROTO ((tree));
/* association mode */
tree association_type_node;
\f
static void
declare_predefined_file (name, assembler_name)
- char *name;
- char* assembler_name;
+ const char *name;
+ const char *assembler_name;
{
tree decl = build_lang_decl (VAR_DECL, get_identifier (name),
stdio_type_node);
check_assoc (assoc, argnum, errmsg)
tree assoc;
int argnum;
- char *errmsg;
+ const char *errmsg;
{
if (assoc == NULL_TREE || TREE_CODE (assoc) == ERROR_MARK)
return 0;
assoc_call (assoc, func, name)
tree assoc;
tree func;
- char *name;
+ const char *name;
{
tree arg1, arg2, arg3;
tree result;
check_transfer (transfer, argnum, errmsg)
tree transfer;
int argnum;
- char *errmsg;
+ const char *errmsg;
{
int result = 0;
check_access (access, argnum, errmsg)
tree access;
int argnum;
- char *errmsg;
+ const char *errmsg;
{
if (access == NULL_TREE || TREE_CODE (access) == ERROR_MARK)
return 1;
check_text (text, argnum, errmsg)
tree text;
int argnum;
- char *errmsg;
+ const char *errmsg;
{
if (text == NULL_TREE || TREE_CODE (text) == ERROR_MARK)
return 0;
{
tree item = TREE_VALUE (exprlist);
tree idx = build_int_2 (idxcnt++, 0);
- char *fieldname = 0;
- char *enumname = 0;
+ const char *fieldname = 0;
+ const char *enumname = 0;
tree array_ref = build_chill_array_ref_1 (iolist, idx);
tree item_type;
tree range_low = NULL_TREE, range_high = NULL_TREE;
} convcode_t;
static convcode_t convcode;
+static tree check_exprlist PROTO ((convcode_t, tree, int,
+ unsigned long));
+
typedef enum
{
False, True,
NormalEnd, EndAtParen, TextFailEnd
} formatexit_t;
+static formatexit_t scanformcont PROTO ((char *, int, char **, int *,
+ tree, tree *, int, int *));
+
/* NOTE: varibale have to be set to False before calling check_format_string */
static Boolean empty_printed;
extern FILE* finput;
extern int maximum_field_alignment;
+
+static int deep_const_expr PROTO ((tree));
+static void chill_print_error_function PROTO ((const char *));
\f
/* return 1 if the expression tree given has all
constant nodes as its leaves; return 0 otherwise. */
-int
+static int
deep_const_expr (exp)
tree exp;
{
return 1;
}
-void
+static void
chill_print_error_function (file)
const char *file;
{
extern struct obstack temporary_obstack;
/* forward declarations */
-static void close_input_file PROTO((char *));
+static void close_input_file PROTO((const char *));
static tree convert_bitstring PROTO((char *));
static tree convert_integer PROTO((char *));
static void maybe_downcase PROTO((char *));
-static int maybe_number PROTO((char *));
+static int maybe_number PROTO((const char *));
static tree equal_number PROTO((void));
static void handle_use_seizefile_directive PROTO((int));
static int handle_name PROTO((tree));
static void skip_c_comment PROTO((void));
static void skip_line_comment PROTO((void));
static int skip_whitespace PROTO((void));
-static tree string_or_char PROTO((int, char *));
+static tree string_or_char PROTO((int, const char *));
+static void ch_lex_init PROTO((void));
+static void skip_directive PROTO((void));
+static int same_file PROTO((const char *, const char *));
+static int getlc PROTO((FILE *));
/* next variables are public, because ch-actions uses them */
fclose (finput);
}
\f
-static int yywrap ();
+static int yywrap PROTO ((void));
+static int yy_refill PROTO ((void));
#define YY_PUTBACK_SIZE 5
#define YY_BUF_SIZE 1000
static char *yy_cur = yy_buffer + YY_PUTBACK_SIZE;
static char *yy_lim = yy_buffer + YY_PUTBACK_SIZE;
-int yy_refill ()
+static int
+yy_refill ()
{
char *buf = yy_buffer + YY_PUTBACK_SIZE;
int c, result;
static void
close_input_file (fn)
- char *fn;
+ const char *fn;
{
if (finput == NULL)
abort ();
tree
build_chill_string (len, str)
int len;
- char *str;
+ const char *str;
{
tree t;
static tree
string_or_char (len, str)
int len;
- char *str;
+ const char *str;
{
tree result;
static int
maybe_number (s)
- char *s;
+ const char *s;
{
char fc;
static int
same_file (filename1, filename2)
- char *filename1;
- char *filename2;
+ const char *filename1;
+ const char *filename2;
{
struct stat s[2];
- char *fn_input[2];
+ const char *fn_input[2];
int i, stat_status;
if (grant_only_flag)
/*
* get input, convert to lower case for comparison
*/
-int
+static int
getlc (file)
FILE *file;
{
*/
void
register_seize_path (path)
- char *path;
+ const char *path;
{
int pathlen = strlen (path);
char *new_path = (char *)xmalloc (pathlen + 1);
extern int chill_at_module_level;
extern tree chill_initializer_name;
-extern void finish_chill_seizes ();
-
extern void prepare_paren_colon PROTO((void));
static void maybe_skip_loop PROTO((void));
static int bottom_loop_end_check PROTO((void));
static int increment_temps PROTO((void));
-static tree build_temporary_variable PROTO((char *, tree));
-static tree maybe_make_for_temp PROTO((tree, char *, tree));
+static tree build_temporary_variable PROTO((const char *, tree));
+static tree maybe_make_for_temp PROTO((tree, const char *, tree));
#if 0
static tree chill_unsigned_type PROTO((tree));
#endif
case DO_POWERSET:
{
tree temp1;
- char *func_name;
+ const char *func_name;
tree user_type = TREE_TYPE (ip->user_var);
if (ip->down_flag)
*/
tree
get_unique_identifier (lead)
- char *lead;
+ const char *lead;
{
char idbuf [256];
static int idcount = 0;
*/
static tree
build_temporary_variable (name, type)
- char *name;
+ const char *name;
tree type;
{
return decl_temp1 (get_unique_identifier (name), type, 0, NULL_TREE, 0, 0);
static tree
maybe_make_for_temp (exp, temp_name, exp_type)
tree exp;
- char *temp_name;
+ const char *temp_name;
tree exp_type;
{
tree result = exp;
enum machine_mode, int));
static int parse_action PROTO((void));
+static void ch_parse_init PROTO((void));
+static void check_end_label PROTO((tree, tree));
+static void end_function PROTO((void));
+static tree build_prefix_clause PROTO((tree));
+static enum terminal PEEK_TOKEN PROTO((void));
+static int peek_token_ PROTO((int));
+static void pushback_token PROTO((int, tree));
+static void forward_token_ PROTO((void));
+static void require PROTO((enum terminal));
+static int check_token PROTO((enum terminal));
+static int expect PROTO((enum terminal, const char *));
+static void define__PROCNAME__ PROTO((void));
extern int lineno;
extern char *input_filename;
if (!id)
{
if (current_module && current_module->name)
- { char *module_name = IDENTIFIER_POINTER (current_module->name);
+ { const char *module_name = IDENTIFIER_POINTER (current_module->name);
if (module_name[0] && module_name[0] != '_')
return current_module->name;
}
/* Skip the next token.
if it isn't TOKEN, the parser is broken. */
-void
+static void
require(token)
enum terminal token;
{
FORWARD_TOKEN();
}
-int
+static int
check_token (token)
enum terminal token;
{
/* return 0 if expected token was not found,
else return 1.
*/
-int
+static int
expect(token, message)
enum terminal token;
- char *message;
+ const char *message;
{
if (PEEK_TOKEN() != token)
{
static void
define__PROCNAME__ ()
{
- char *fname;
+ const char *fname;
tree string;
tree procname;
}
/* Forward declarations. */
-static tree parse_expression ();
-static tree parse_primval ();
+static tree parse_expression PROTO((void));
+static tree parse_primval PROTO((void));
static tree parse_mode PROTO((void));
static tree parse_opt_mode PROTO((void));
-static tree parse_untyped_expr ();
-static tree parse_opt_untyped_expr ();
+static tree parse_untyped_expr PROTO((void));
+static tree parse_opt_untyped_expr PROTO((void));
static int parse_definition PROTO((int));
-static void parse_opt_actions ();
+static void parse_opt_actions PROTO((void));
static void parse_body PROTO((void));
static tree parse_if_expression_body PROTO((void));
static tree parse_opt_handler PROTO((void));
+static tree parse_opt_name_string PROTO((int));
+static tree parse_simple_name_string PROTO((void));
+static tree parse_name_string PROTO((void));
+static tree parse_defining_occurrence PROTO((void));
+static tree parse_name PROTO((void));
+static tree parse_optlabel PROTO((void));
+static void parse_opt_end_label_semi_colon PROTO((tree));
+static void parse_modulion PROTO((tree));
+static void parse_spec_module PROTO((tree));
+static void parse_semi_colon PROTO((void));
+static tree parse_defining_occurrence_list PROTO((void));
+static void parse_mode_definition PROTO((int));
+static void parse_mode_definition_statement PROTO((int));
+static void parse_synonym_definition PROTO((void));
+static void parse_synonym_definition_statement PROTO((void));
+static tree parse_on_exception_list PROTO((void));
+static void parse_on_alternatives PROTO((void));
+static void parse_loc_declaration PROTO((int));
+static void parse_declaration_statement PROTO((int));
+static tree parse_optforbid PROTO((void));
+static tree parse_postfix PROTO((enum terminal));
+static tree parse_postfix_list PROTO((enum terminal));
+static void parse_rename_clauses PROTO((enum terminal));
+static tree parse_opt_prefix_clause PROTO((void));
+static void parse_grant_statement PROTO((void));
+static void parse_seize_statement PROTO((void));
+static tree parse_param_name_list PROTO((void));
+static tree parse_param_attr PROTO((void));
+static tree parse_formpar PROTO((void));
+static tree parse_formparlist PROTO((void));
+static tree parse_opt_result_spec PROTO((void));
+static tree parse_opt_except PROTO((void));
+static tree parse_opt_recursive PROTO((void));
+static tree parse_procedureattr PROTO((void));
+static void parse_proc_body PROTO((tree, tree));
+static void parse_procedure_definition PROTO((int));
+static tree parse_processpar PROTO((void));
+static tree parse_processparlist PROTO((void));
+static void parse_process_definition PROTO((int));
+static void parse_signal_definition PROTO((void));
+static void parse_signal_definition_statement PROTO((void));
+static void parse_then_clause PROTO((void));
+static void parse_opt_else_clause PROTO((void));
+static tree parse_expr_list PROTO((void));
+static tree parse_range_list_clause PROTO((void));
+static void pushback_paren_expr PROTO((tree));
+static tree parse_case_label PROTO((void));
+static tree parse_case_label_list PROTO((tree, int));
+static tree parse_case_label_specification PROTO((tree));
+static void parse_single_dimension_case_action PROTO((tree));
+static void parse_multi_dimension_case_action PROTO((tree));
+static void parse_case_action PROTO((tree));
+static tree parse_asm_operands PROTO((void));
+static tree parse_asm_clobbers PROTO((void));
+static void ch_expand_asm_operands PROTO((tree, tree, tree, tree, int, char *, int));
+static void parse_asm_action PROTO((void));
+static void parse_begin_end_block PROTO((tree));
+static void parse_if_action PROTO((tree));
+static void parse_iteration PROTO((void));
+static tree parse_delay_case_event_list PROTO((void));
+static void parse_delay_case_action PROTO((tree));
+static void parse_do_action PROTO((tree));
+static tree parse_receive_spec PROTO((void));
+static void parse_receive_case_action PROTO((tree));
+static void parse_send_action PROTO((void));
+static void parse_start_action PROTO((void));
+static tree parse_call PROTO((tree));
+static tree parse_tuple_fieldname_list PROTO((void));
+static tree parse_tuple_element PROTO((void));
+static tree parse_opt_element_list PROTO((void));
+static tree parse_tuple PROTO((tree));
+static tree parse_operand6 PROTO((void));
+static tree parse_operand5 PROTO((void));
+static tree parse_operand4 PROTO((void));
+static tree parse_operand3 PROTO((void));
+static tree parse_operand2 PROTO((void));
+static tree parse_operand1 PROTO((void));
+static tree parse_operand0 PROTO((void));
+static tree parse_case_expression PROTO((void));
+static tree parse_then_alternative PROTO((void));
+static tree parse_else_alternative PROTO((void));
+static tree parse_if_expression PROTO((void));
+static tree parse_index_mode PROTO((void));
+static tree parse_set_mode PROTO((void));
+static tree parse_pos PROTO((void));
+static tree parse_step PROTO((void));
+static tree parse_opt_layout PROTO((int));
+static tree parse_field_name_list PROTO((void));
+static tree parse_fixed_field PROTO((void));
+static tree parse_variant_field_list PROTO((void));
+static tree parse_variant_alternative PROTO((void));
+static tree parse_field PROTO((void));
+static tree parse_structure_mode PROTO((void));
+static tree parse_opt_queue_size PROTO((void));
+static tree parse_procedure_mode PROTO((void));
+static void parse_program PROTO((void));
+static void parse_pass_1_2 PROTO((void));
static tree
parse_opt_name_string (allow_all)
ignoring = save_ignoring;
}
-void
+static void
parse_mode_definition_statement (is_newmode)
int is_newmode;
{
parse_semi_colon ();
}
-tree
+static tree
parse_optforbid ()
{
if (check_token (FORBID) == 0)
/* Matches: <grant postfix> or <seize postfix>
Returns: A (singleton) TREE_LIST. */
-tree
+static tree
parse_postfix (grant_or_seize)
enum terminal grant_or_seize;
{
return build_tree_list (forbid, name);
}
-tree
+static tree
parse_postfix_list (grant_or_seize)
enum terminal grant_or_seize;
{
return list;
}
-void
+static void
parse_rename_clauses (grant_or_seize)
enum terminal grant_or_seize;
{
return build_prefix_clause (parse_opt_name_string (0));
}
-void
+static void
parse_grant_statement ()
{
require (GRANT);
}
}
-void
+static void
parse_seize_statement ()
{
require (SEIZE);
ignoring = 0;
require (COLON); require (PROCESS);
expect (LPRN, "missing '(' after PROCESS");
- params = parse_processparlist (in_spec_module);
+ params = parse_processparlist ();
expect (RPRN, "missing ')' in PROCESS");
ignoring = save_ignoring;
if (in_spec_module)
return NULL_TREE;
while (check_token (COMMA))
{
- name = parse_name_string (0);
+ name = parse_name_string ();
}
if (check_token (SC))
{
return list;
}
-void
+static void
ch_expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
tree string, outputs, inputs, clobbers;
int vol;
finish_outer_function ();
}
-void
+static void
parse_pass_1_2()
{
parse_program();
tree decl;
};
-/* forward declaration */
-tree satisfy PROTO((tree, struct decl_chain *));
+/* forward declarations */
+static tree satisfy PROTO ((tree, struct decl_chain *));
+static void cycle_error_print PROTO ((struct decl_chain *, tree));
+static tree safe_satisfy_decl PROTO ((tree, struct decl_chain *));
+static void satisfy_list PROTO ((tree, struct decl_chain *));
+static void satisfy_list_values PROTO ((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;
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;
tree chill_taskingcode_type_node;
/* forward declarations */
-void validate_process_parameters PROTO((tree));
-tree make_process_struct PROTO((tree, tree));
+#if 0
+static void validate_process_parameters PROTO((tree));
+static tree get_struct_variable_name PROTO((tree));
+static tree decl_tasking_code_variable PROTO((tree, tree *, int));
+#endif
+static tree get_struct_debug_type_name PROTO((tree));
+static tree get_process_wrapper_name PROTO((tree));
+static tree build_tasking_enum PROTO((void));
+static void build_tasking_message_type PROTO((void));
+static tree build_receive_signal_case_label PROTO((tree, tree));
+static tree build_receive_buffer_case_label PROTO((tree, tree));
+static void build_receive_buffer_case_end PROTO((tree, tree));
+static void build_receive_signal_case_end PROTO((tree, tree));
/* list of this module's process, buffer, etc. decls.
This is a list of TREE_VECs, chain by their TREE_CHAINs. */
#define TASK_INFO_STUFF_TYPE(NODE) TREE_VEC_ELT(NODE,4)
/* name template for process argument type */
-static char * struct_name = "__tmp_%s_arg_type";
+static const char * struct_name = "__tmp_%s_arg_type";
/* name template for process arguments for debugging type */
-static char * struct_debug_name = "__tmp_%s_debug_type";
+static const char * struct_debug_name = "__tmp_%s_debug_type";
#if 0
/* name template for process argument variable */
-static char * data_name = "__tmp_%s_arg_variable";
+static const char * data_name = "__tmp_%s_arg_variable";
#endif
/* name template for process wrapper */
-static char * wrapper_name = "__tmp_%s_wrapper";
+static const char * wrapper_name = "__tmp_%s_wrapper";
extern int ignoring;
static tree void_ftype_void;
get_struct_type_name (name)
tree name;
{
- char *idp = IDENTIFIER_POINTER (name); /* process name */
+ const char *idp = IDENTIFIER_POINTER (name); /* process name */
char *tmpname = xmalloc (strlen (idp) + strlen (struct_name) + 1);
sprintf (tmpname, struct_name, idp);
return get_identifier (tmpname);
}
-tree
+static tree
get_struct_debug_type_name (name)
tree name;
{
- char *idp = IDENTIFIER_POINTER (name); /* process name */
+ const char *idp = IDENTIFIER_POINTER (name); /* process name */
char *tmpname = xmalloc (strlen (idp) + strlen (struct_debug_name) + 1);
sprintf (tmpname, struct_debug_name, idp);
get_tasking_code_name (name)
tree name;
{
- char *skelname = "__tmp_%s_code";
- char *name_str = IDENTIFIER_POINTER (name);
+ const char *skelname = "__tmp_%s_code";
+ const char *name_str = IDENTIFIER_POINTER (name);
char *tmpname = (char *)alloca (IDENTIFIER_LENGTH (name) +
strlen (skelname) + 1);
get_struct_variable_name (name)
tree name;
{
- char *idp = IDENTIFIER_POINTER (name); /* process name */
+ const char *idp = IDENTIFIER_POINTER (name); /* process name */
char *tmpname = xmalloc (strlen (idp) + strlen (data_name) + 1);
sprintf (tmpname, data_name, idp);
get_process_wrapper_name (name)
tree name;
{
- char *idp = IDENTIFIER_POINTER (name);
+ const char *idp = IDENTIFIER_POINTER (name);
char *tmpname = xmalloc (strlen (idp) + strlen (wrapper_name) + 1);
sprintf (tmpname, wrapper_name, idp);
* be initialized. The other module will do that. This is just
* for BUFFERs and EVENTs.
*/
-tree
+#if 0
+static tree
decl_tasking_code_variable (name, tasking_code_ptr, quasi_flag)
tree name, *tasking_code_ptr;
int quasi_flag;
*tasking_code_ptr));
return decl;
}
+#endif
\f
/*
* Transmute a process parameter list into an argument structure
property"
*/
-void
+#if 0
+static void
validate_process_parameters (parms)
tree parms ATTRIBUTE_UNUSED;
{
}
+#endif
\f
/*
* build the tree for a start process action. Loop through the
if (valtail != 0 && TREE_VALUE (valtail) != void_type_node)
{
- char *errstr = "too many arguments to process";
+ const char *errstr = "too many arguments to process";
if (process_name)
error ("%s `%s'", errstr, IDENTIFIER_POINTER (process_name));
else
}
else if (typetail != 0 && TREE_VALUE (typetail) != void_type_node)
{
- char *errstr = "too few arguments to process";
+ const char *errstr = "too few arguments to process";
if (process_name)
error ("%s `%s'", errstr, IDENTIFIER_POINTER (process_name));
else
add_taskstuff_to_list (code_decl, stufftype, stuffnumber,
proc_decl, entry)
tree code_decl;
- char *stufftype;
+ const char *stufftype;
tree stuffnumber, proc_decl, entry;
{
if (pass == 1)
if (CH_IS_BUFFER_MODE (TREE_TYPE (buf_ev)) ||
CH_IS_EVENT_MODE (TREE_TYPE (buf_ev)))
{
- char *field_name;
+ const char *field_name;
tree arg1, arg2;
if (CH_IS_EVENT_MODE (TREE_TYPE (buf_ev)))
*
#endif
-void
+static void
build_tasking_message_type ()
{
tree type_name;
/* This is special sentinel used to communicate from build_string_type
to layout_chill_range_type for the index range of a string. */
tree string_index_type_dummy;
+
+static tree make_powerset_type PROTO ((tree));
\f
/* Build a chill string type.
For a character string, ELT_TYPE==char_type_node;
return t;
}
\f
-tree
+static tree
make_powerset_type (domain)
tree domain;
{
tree
get_identifier3 (part1, part2, part3)
- char *part1, *part2, *part3;
+ const char *part1, *part2, *part3;
{
char *buf = (char*)
alloca (strlen(part1) + strlen(part2) + strlen(part3) + 1);
{
tree decl = make_node (ALIAS_DECL);
- char *postfix_pointer = IDENTIFIER_POINTER (postfix);
+ const char *postfix_pointer = IDENTIFIER_POINTER (postfix);
int postfix_length = IDENTIFIER_LENGTH (postfix);
int old_length = old_prefix ? IDENTIFIER_LENGTH(old_prefix) : 0;
int new_length = new_prefix ? IDENTIFIER_LENGTH(new_prefix) : 0;
decl_check_rename (alias, old_name)
tree alias, old_name;
{
- char *old_pointer = IDENTIFIER_POINTER (old_name);
+ const char *old_pointer = IDENTIFIER_POINTER (old_name);
int old_len = IDENTIFIER_LENGTH (old_name);
if (DECL_OLD_PREFIX (alias))
{
/* forward declarations */
static int chill_l_equivalent PROTO((tree, tree, struct mode_chain*));
-static tree extract_constant_from_buffer PROTO((tree, unsigned char *, int));
+static tree extract_constant_from_buffer PROTO((tree, const unsigned char *, int));
static int expand_constant_to_buffer PROTO((tree, unsigned char *, int));
+static tree build_empty_string PROTO((tree));
+static tree make_chill_pointer_type PROTO((tree, enum tree_code));
+static tree make_chill_range_type PROTO((tree, tree, tree));
+static void apply_chill_array_layout PROTO((tree));
+static int field_decl_cmp PROTO((tree *, tree*));
+static tree make_chill_struct_type PROTO((tree));
+static int apply_chill_field_layout PROTO((tree, int *));
\f
/*
* This function checks an array access.
tree
valid_array_index_p (array, idx, error_message, is_varying_lhs)
tree array, idx;
- char *error_message;
+ const char *error_message;
int is_varying_lhs;
{
tree cond, low_limit, high_cond, atype, domain;
static tree
extract_constant_from_buffer (type, buffer, buf_size)
tree type;
- unsigned char *buffer;
+ const unsigned char *buffer;
int buf_size;
{
tree value;
chill_expand_tuple (type, constructor)
tree type, constructor;
{
- char *name;
+ const char *name;
tree nonreft = type;
if (TYPE_NAME (type) != NULL_TREE)
/* Construct, lay out and return the type of pointers to TO_TYPE.
If such a type has already been constructed, reuse it. */
-tree
+static tree
make_chill_pointer_type (to_type, code)
tree to_type;
enum tree_code code; /* POINTER_TYPE or REFERENCE_TYPE */
return t;
}
\f
-tree
+static tree
make_chill_range_type (type, lowval, highval)
tree type, lowval, highval;
{
return (long)DECL_NAME (*x) - (long)DECL_NAME (*y);
}
-tree
+static tree
make_chill_struct_type (fieldlist)
tree fieldlist;
{
for (x = fieldlist; x; x = TREE_CHAIN (x))
field_array[len++] = x;
- qsort (field_array, len, sizeof (tree), field_decl_cmp);
+ qsort (field_array, len, sizeof (tree),
+ (int (*) PROTO ((const void *, const void *))) field_decl_cmp);
}
}