Warning fixes:
* Makefile.in (actions.o, convert.o, decl.o, expr.o, lang.o, lex.o, loop.o, parse.o, satisfy.o, timing.o, tasking.o, tree.o, typeck.o): Depend on system.h and toplev.h. (except.o): Depend on toplev.h. (grant.o): Depend on system.h, toplev.h and output.h. * actions.c: Include system.h and toplev.h. Remove redundant prototypes. (build_cause_exception): Add default case in switch. (update_else_range_for_range): Add parentheses around && within ||. (chill_handle_multi_case_label_list): Remove unused variable `selector_value'. (print_missing_cases): Reconcile format specifiers vs arguments in calls to sprintf. * ch-tree.h: Don't include stdio.h. Wrap prototypes using FILE* with macro BUFSIZ. Add missing prototypes. * convert.c: Include system.h and toplev.h. Remove redundant prototypes. (convert): Remove unused variable `errstr'. * decl.c: Include system.h and toplev.h. Remove redundant prototypes. (builtin_scope): Add missing initializers. (clear_scope): Likewise. (allocate_lang_decl): Mark parameter `t' with ATTRIBUTE_UNUSED. (copy_lang_decl): Likewise for parameter `node'. (c_decode_option): Likewise for parameter `argc'. (push_extern_function): Likewise for parameter `granting'. (switch_to_pass_2): Hide declaration of errorcount/sorrycount. (pushdecl): Remove unused variable `t'. (lookup_name_current_level): Make static and hide. (lookup_name_for_seizing): Make static. (finish_decl): Remove unused variable `type'. (maybe_build_cleanup): Mark parameter `decl' with ATTRIBUTE_UNUSED. (complete_array_type): Mark parameters `type', `initial_value' and `do_default' with ATTRIBUTE_UNUSED. (start_struct): Mark parameter `name' with ATTRIBUTE_UNUSED. (start_enum): Likewise. (shadow_record_fields): Remove unused variables `type' and `parent'. * except.c: Include toplev.h. Remove redundant prototypes. * expr.c: Include system.h and toplev.h. Don't define NULL. Remove redundant prototypes. (internal_build_compound_expr): Mark parameter `first_p' with ATTRIBUTE_UNUSED. (build_allocate_getstack): Remove unused variable `init'. (build_chill_pred_or_succ): Likewise for variable `limit'. (varying_to_slice): Likewise for variable `doamin' [sic]. (finish_chill_binary_op): Likewise for variables `code0' and `code1'. Remove unused label `finish'. Add explicit braces to avoid ambiguous `else'. (build_chill_addr_expr): Remove extra parameter in call to `error'. (build_chill_unary_op): Remove unused variables `class' and `type0'. (powersetlen): Remove unused variables `domain' and `temp'. * grant.c: Include system.h, toplev.h and output.h. Don't handle strchr/strrchr. Remove redundant prototypes. (decode_constant_selective): Remove unused variables `op' and `wrk'. (push_granted): Mark parameters `name' and `decl' with ATTRIBUTE_UNUSED. * inout.c: Include system.h and toplev.h. Remove redundant prototypes. (textlocation_mode): Use &&, not &, when comparing two truth values. (scanformcont): Remove unused label `do_the_action'. * lang.c: Include system.h and toplev.h. Remove redundant prototypes. (lookup_interface): Mark parameter `arg' with ATTRIBUTE_UNUSED. (maybe_objc_comptypes): Likewise for parameters `lhs' and `rhs'. (lang_print_xnode): Likewise for parameters `file', `node' and `indent'. (lang_decode_option): Explicitly declare `explicit_ignore_case'. (incomplete_type_error): Mark parameters `value' and `type' with ATTRIBUTE_UNUSED. * lex.c: Include system.h and toplev.h. Remove redundant prototypes. Don't handle strchr/strrchr. Use CAPITALIZED versions of ctype macros from system.h. Cast ctype arguments to unsigned char when necessary. (last_token, RETURN_TOKEN): Hide definition. (push_back): Remove unused function. (readstring): Change variable `i' to unsigned. (yywrap): Remove unused variable `node'. * loop.c: Include system.h and toplev.h. Remove redundant prototypes. (chill_unsigned_type): Hide prototype and definition. (begin_loop_scope): Remove unused variable `firstp'. (nonvalue_begin_loop_scope): Likewise. * parse.c: Include system.h and toplev.h. Remove redundant prototypes. (quasi_signal): Hide. (PEEK_TOKEN): Change return type to `enum terminal'. (parse_mode_definition_statement): Remove unused variable `names'. (parse_formpar): Remove unused parameter `in_spec_module'. All callers changed. (parse_formparlist): Likewise. (parse_processpar): Remove unused variable `parms'. (parse_definition): Add explicit braces to avoid ambiguous `else'. (parse_multi_dimension_case_action): Initialize variable `begin_test_label'. Remove unused variable `new_test'. (parse_case_action): Remove unused variable `caseaction_flag'. (parse_asm_clobbers): Remove unused variable `expr'. (parse_delay_case_action): Initialize variable `label_cnt'. (parse_action): Make function static. (parse_tuple_element): Remove unused variable `list'. (parse_primval): Add default case in switch. (parse_variant_alternative): Remove unused variables `x' and `variant_fields'. * satisfy.c: Include system.h and toplev.h. Remove redundant prototypes. * tasking.c Include system.h and toplev.h. Remove redundant prototypes. (data_name): Hide. (get_struct_variable_name): Likewise. (validate_process_parameters): Mark parameter `parms' with ATTRIBUTE_UNUSED. (build_start_process): Initialize variable `tuple'. (build_receive_buffer_case_end): Remove unused variable `buffer_ptr'. * timing.c: Include system.h and toplev.h. (build_after_timeout_start): Remove unused variable `goto_where'. * tree.c: Include system.h and toplev.h. Remove redundant prototypes. * typeck.c: Include system.h and toplev.h. Remove redundant prototypes. (extract_constant_from_buffer): Make function static. Add explicit braces to avoid ambiguous `else'. (expand_constant_to_buffer): Likewise. (build_chill_slice): remove unused variable `is_static'. (chill_compatible): Add explicit braces to avoid ambiguous `else'. (apply_chill_array_layout): Remove unused variable `offset'. (smash_dummy_type): Remove unused variable `save_lang_specific'. (initializer_constant_valid_p): Add default case in switch. From-SVN: r22493
This commit is contained in:
parent
9a8a366668
commit
7511142254
147
gcc/ch/ChangeLog
147
gcc/ch/ChangeLog
|
@ -1,3 +1,150 @@
|
|||
Sun Sep 20 09:25:13 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* Makefile.in (actions.o, convert.o, decl.o, expr.o, lang.o,
|
||||
lex.o, loop.o, parse.o, satisfy.o, timing.o, tasking.o, tree.o,
|
||||
typeck.o): Depend on system.h and toplev.h.
|
||||
(except.o): Depend on toplev.h.
|
||||
(grant.o): Depend on system.h, toplev.h and output.h.
|
||||
|
||||
* actions.c: Include system.h and toplev.h. Remove redundant
|
||||
prototypes.
|
||||
(build_cause_exception): Add default case in switch.
|
||||
(update_else_range_for_range): Add parentheses around && within ||.
|
||||
(chill_handle_multi_case_label_list): Remove unused variable
|
||||
`selector_value'.
|
||||
(print_missing_cases): Reconcile format specifiers vs arguments in
|
||||
calls to sprintf.
|
||||
|
||||
* ch-tree.h: Don't include stdio.h. Wrap prototypes using FILE*
|
||||
with macro BUFSIZ. Add missing prototypes.
|
||||
|
||||
* convert.c: Include system.h and toplev.h. Remove redundant
|
||||
prototypes.
|
||||
(convert): Remove unused variable `errstr'.
|
||||
|
||||
* decl.c: Include system.h and toplev.h. Remove redundant
|
||||
prototypes.
|
||||
(builtin_scope): Add missing initializers.
|
||||
(clear_scope): Likewise.
|
||||
(allocate_lang_decl): Mark parameter `t' with ATTRIBUTE_UNUSED.
|
||||
(copy_lang_decl): Likewise for parameter `node'.
|
||||
(c_decode_option): Likewise for parameter `argc'.
|
||||
(push_extern_function): Likewise for parameter `granting'.
|
||||
(switch_to_pass_2): Hide declaration of errorcount/sorrycount.
|
||||
(pushdecl): Remove unused variable `t'.
|
||||
(lookup_name_current_level): Make static and hide.
|
||||
(lookup_name_for_seizing): Make static.
|
||||
(finish_decl): Remove unused variable `type'.
|
||||
(maybe_build_cleanup): Mark parameter `decl' with ATTRIBUTE_UNUSED.
|
||||
(complete_array_type): Mark parameters `type', `initial_value' and
|
||||
`do_default' with ATTRIBUTE_UNUSED.
|
||||
(start_struct): Mark parameter `name' with ATTRIBUTE_UNUSED.
|
||||
(start_enum): Likewise.
|
||||
(shadow_record_fields): Remove unused variables `type' and `parent'.
|
||||
|
||||
* except.c: Include toplev.h. Remove redundant prototypes.
|
||||
|
||||
* expr.c: Include system.h and toplev.h. Don't define NULL.
|
||||
Remove redundant prototypes.
|
||||
(internal_build_compound_expr): Mark parameter `first_p' with
|
||||
ATTRIBUTE_UNUSED.
|
||||
(build_allocate_getstack): Remove unused variable `init'.
|
||||
(build_chill_pred_or_succ): Likewise for variable `limit'.
|
||||
(varying_to_slice): Likewise for variable `doamin' [sic].
|
||||
(finish_chill_binary_op): Likewise for variables `code0' and
|
||||
`code1'. Remove unused label `finish'. Add explicit braces to
|
||||
avoid ambiguous `else'.
|
||||
(build_chill_addr_expr): Remove extra parameter in call to `error'.
|
||||
(build_chill_unary_op): Remove unused variables `class' and `type0'.
|
||||
(powersetlen): Remove unused variables `domain' and `temp'.
|
||||
|
||||
* grant.c: Include system.h, toplev.h and output.h. Don't handle
|
||||
strchr/strrchr. Remove redundant prototypes.
|
||||
(decode_constant_selective): Remove unused variables `op' and `wrk'.
|
||||
(push_granted): Mark parameters `name' and `decl' with
|
||||
ATTRIBUTE_UNUSED.
|
||||
|
||||
* inout.c: Include system.h and toplev.h. Remove redundant
|
||||
prototypes.
|
||||
(textlocation_mode): Use &&, not &, when comparing two truth
|
||||
values.
|
||||
(scanformcont): Remove unused label `do_the_action'.
|
||||
|
||||
* lang.c: Include system.h and toplev.h. Remove redundant
|
||||
prototypes.
|
||||
(lookup_interface): Mark parameter `arg' with ATTRIBUTE_UNUSED.
|
||||
(maybe_objc_comptypes): Likewise for parameters `lhs' and `rhs'.
|
||||
(lang_print_xnode): Likewise for parameters `file', `node' and
|
||||
`indent'.
|
||||
(lang_decode_option): Explicitly declare `explicit_ignore_case'.
|
||||
(incomplete_type_error): Mark parameters `value' and `type' with
|
||||
ATTRIBUTE_UNUSED.
|
||||
|
||||
* lex.c: Include system.h and toplev.h. Remove redundant
|
||||
prototypes. Don't handle strchr/strrchr. Use CAPITALIZED
|
||||
versions of ctype macros from system.h. Cast ctype arguments to
|
||||
unsigned char when necessary.
|
||||
(last_token, RETURN_TOKEN): Hide definition.
|
||||
(push_back): Remove unused function.
|
||||
(readstring): Change variable `i' to unsigned.
|
||||
(yywrap): Remove unused variable `node'.
|
||||
|
||||
* loop.c: Include system.h and toplev.h. Remove redundant
|
||||
prototypes.
|
||||
(chill_unsigned_type): Hide prototype and definition.
|
||||
(begin_loop_scope): Remove unused variable `firstp'.
|
||||
(nonvalue_begin_loop_scope): Likewise.
|
||||
|
||||
* parse.c: Include system.h and toplev.h. Remove redundant
|
||||
prototypes.
|
||||
(quasi_signal): Hide.
|
||||
(PEEK_TOKEN): Change return type to `enum terminal'.
|
||||
(parse_mode_definition_statement): Remove unused variable `names'.
|
||||
(parse_formpar): Remove unused parameter `in_spec_module'. All
|
||||
callers changed.
|
||||
(parse_formparlist): Likewise.
|
||||
(parse_processpar): Remove unused variable `parms'.
|
||||
(parse_definition): Add explicit braces to avoid ambiguous `else'.
|
||||
(parse_multi_dimension_case_action): Initialize variable
|
||||
`begin_test_label'. Remove unused variable `new_test'.
|
||||
(parse_case_action): Remove unused variable `caseaction_flag'.
|
||||
(parse_asm_clobbers): Remove unused variable `expr'.
|
||||
(parse_delay_case_action): Initialize variable `label_cnt'.
|
||||
(parse_action): Make function static.
|
||||
(parse_tuple_element): Remove unused variable `list'.
|
||||
(parse_primval): Add default case in switch.
|
||||
(parse_variant_alternative): Remove unused variables `x' and
|
||||
`variant_fields'.
|
||||
|
||||
* satisfy.c: Include system.h and toplev.h. Remove redundant
|
||||
prototypes.
|
||||
|
||||
* tasking.c Include system.h and toplev.h. Remove redundant
|
||||
prototypes.
|
||||
(data_name): Hide.
|
||||
(get_struct_variable_name): Likewise.
|
||||
(validate_process_parameters): Mark parameter `parms' with
|
||||
ATTRIBUTE_UNUSED.
|
||||
(build_start_process): Initialize variable `tuple'.
|
||||
(build_receive_buffer_case_end): Remove unused variable `buffer_ptr'.
|
||||
|
||||
* timing.c: Include system.h and toplev.h.
|
||||
(build_after_timeout_start): Remove unused variable `goto_where'.
|
||||
|
||||
* tree.c: Include system.h and toplev.h. Remove redundant
|
||||
prototypes.
|
||||
|
||||
* typeck.c: Include system.h and toplev.h. Remove redundant
|
||||
prototypes.
|
||||
(extract_constant_from_buffer): Make function static. Add
|
||||
explicit braces to avoid ambiguous `else'.
|
||||
(expand_constant_to_buffer): Likewise.
|
||||
(build_chill_slice): remove unused variable `is_static'.
|
||||
(chill_compatible): Add explicit braces to avoid ambiguous `else'.
|
||||
(apply_chill_array_layout): Remove unused variable `offset'.
|
||||
(smash_dummy_type): Remove unused variable `save_lang_specific'.
|
||||
(initializer_constant_valid_p): Add default case in switch.
|
||||
|
||||
Mon Sep 14 16:46:36 1998 Dave Brolley <brolley@cygnus.com>
|
||||
|
||||
* typeck.c (build_chill_slice): Always use TYPE_DOMAIN to get the
|
||||
|
|
|
@ -270,34 +270,49 @@ $(srcdir)/hash.h:
|
|||
$(RM) gperf.tmp gperf.tmp2 sed.tmp
|
||||
|
||||
actions.o : actions.c $(CONFIG_H) $(CHILL_TREE_H) actions.h $(RTL_H) \
|
||||
lex.h $(srcdir)/../flags.h $(srcdir)/../../include/obstack.h $(srcdir)/../input.h $(srcdir)/../expr.h ../insn-codes.h
|
||||
convert.o : convert.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../flags.h $(srcdir)/../tree.h
|
||||
decl.o : decl.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../flags.h lex.h
|
||||
except.o : except.c $(CONFIG_H) $(srcdir)/../tree.h $(RTL_H) $(CHILL_TREE_H)
|
||||
lex.h $(srcdir)/../flags.h $(srcdir)/../../include/obstack.h \
|
||||
$(srcdir)/../input.h $(srcdir)/../expr.h ../insn-codes.h \
|
||||
$(srcdir)/../system.h $(srcdir)/../toplev.h
|
||||
convert.o : convert.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../flags.h \
|
||||
$(srcdir)/../tree.h $(srcdir)/../system.h $(srcdir)/../toplev.h
|
||||
decl.o : decl.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../flags.h lex.h \
|
||||
$(srcdir)/../system.h $(srcdir)/../toplev.h
|
||||
except.o : except.c $(CONFIG_H) $(srcdir)/../tree.h $(RTL_H) $(CHILL_TREE_H) \
|
||||
$(srcdir)/../toplev.h
|
||||
expr.o : expr.c $(CONFIG_H) $(RTL_H) $(CHILL_TREE_H) $(srcdir)/../flags.h \
|
||||
$(srcdir)/../expr.h ../insn-codes.h $(srcdir)/../tree.h lex.h
|
||||
grant.o: grant.c $(CONFIG_H) $(CHILL_TREE_H) $(RTL_H) $(srcdir)/../flags.h $(srcdir)/../input.h \
|
||||
lex.h actions.h $(srcdir)/../input.h
|
||||
inout.o : inout.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../flags.h $(srcdir)/../input.h
|
||||
lang.o : lang.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../input.h lex.h
|
||||
lex.o : lex.c $(CONFIG_H) $(CHILL_TREE_H) $(RTL_H) $(srcdir)/../flags.h $(srcdir)/../input.h \
|
||||
$(srcdir)/parse.h $(srcdir)/../../include/obstack.h lex.h
|
||||
$(srcdir)/../expr.h ../insn-codes.h $(srcdir)/../tree.h lex.h \
|
||||
$(srcdir)/../system.h $(srcdir)/../toplev.h
|
||||
grant.o: grant.c $(CONFIG_H) $(CHILL_TREE_H) $(RTL_H) $(srcdir)/../flags.h \
|
||||
$(srcdir)/../input.h lex.h actions.h $(srcdir)/../system.h \
|
||||
$(srcdir)/../toplev.h $(srcdir)/../output.h
|
||||
inout.o : inout.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../flags.h \
|
||||
$(srcdir)/../input.h $(srcdir)/../system.h $(srcdir)/../toplev.h
|
||||
lang.o : lang.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../input.h lex.h \
|
||||
$(srcdir)/../system.h $(srcdir)/../toplev.h
|
||||
lex.o : lex.c $(CONFIG_H) $(CHILL_TREE_H) $(RTL_H) $(srcdir)/../flags.h \
|
||||
$(srcdir)/../input.h $(srcdir)/parse.h $(srcdir)/../system.h \
|
||||
$(srcdir)/../toplev.h $(srcdir)/../../include/obstack.h lex.h
|
||||
lex.c: hash.h
|
||||
loop.o : loop.c $(CONFIG_H) $(RTL_H) $(CHILL_TREE_H) lex.h \
|
||||
$(srcdir)/../flags.h $(srcdir)/../input.h \
|
||||
$(srcdir)/../../include/obstack.h $(srcdir)/../tree.h
|
||||
$(srcdir)/../../include/obstack.h $(srcdir)/../tree.h \
|
||||
$(srcdir)/../system.h $(srcdir)/../toplev.h
|
||||
parse.o : parse.c $(CONFIG_H) $(CHILL_TREE_H) parse.h \
|
||||
lex.h actions.h tasking.h
|
||||
lex.h actions.h tasking.h $(srcdir)/../system.h $(srcdir)/../toplev.h
|
||||
satisfy.o : satisfy.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../tree.h \
|
||||
$(srcdir)/../flags.h lex.h
|
||||
$(srcdir)/../flags.h lex.h $(srcdir)/../system.h $(srcdir)/../toplev.h
|
||||
timing.o : timing.c $(CONFIG_H) $(CHILL_TREE_H) $(RTL_H) $(srcdir)/../flags.h \
|
||||
$(srcdir)/../input.h $(srcdir)/../../include/obstack.h lex.h
|
||||
$(srcdir)/../input.h $(srcdir)/../../include/obstack.h lex.h \
|
||||
$(srcdir)/../system.h $(srcdir)/../toplev.h
|
||||
tasking.o : tasking.c $(CONFIG_H) $(CHILL_TREE_H) $(RTL_H) \
|
||||
$(srcdir)/../flags.h $(srcdir)/../input.h \
|
||||
$(srcdir)/../../include/obstack.h lex.h
|
||||
tree.o : tree.c $(CONFIG_H) $(CHILL_TREE_H)
|
||||
$(srcdir)/../../include/obstack.h lex.h $(srcdir)/../system.h \
|
||||
$(srcdir)/../toplev.h
|
||||
tree.o : tree.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../system.h \
|
||||
$(srcdir)/../toplev.h
|
||||
typeck.o : typeck.c $(CONFIG_H) $(CHILL_TREE_H) ../insn-codes.h \
|
||||
$(srcdir)/../expr.h $(srcdir)/../flags.h lex.h
|
||||
$(srcdir)/../expr.h $(srcdir)/../flags.h lex.h $(srcdir)/../system.h \
|
||||
$(srcdir)/../toplev.h
|
||||
ch-version.o : ch-version.c
|
||||
ch-version.c : Makefile
|
||||
echo 'char *gnuchill_version = "$(GNUCHILL_VERSION)";' > $@
|
||||
|
|
|
@ -18,9 +18,8 @@ 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. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "tree.h"
|
||||
#include "rtl.h"
|
||||
#include "expr.h"
|
||||
|
@ -30,6 +29,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||
#include "actions.h"
|
||||
#include "obstack.h"
|
||||
#include "assert.h"
|
||||
#include "toplev.h"
|
||||
|
||||
#define obstack_chunk_alloc xmalloc
|
||||
#define obstack_chunk_free free
|
||||
|
@ -43,18 +43,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||
extern int flag_short_enums;
|
||||
extern int current_nesting_level;
|
||||
|
||||
extern tree build_chill_compound_expr PROTO((tree));
|
||||
extern tree build_chill_exception_decl PROTO((char *));
|
||||
extern tree convert PROTO((tree, tree));
|
||||
extern rtx emit_line_note_force PROTO((char *, int));
|
||||
extern void error PROTO((char *, ...));
|
||||
extern void error_with_decl PROTO((tree, char *, ...));
|
||||
extern rtx gen_nop PROTO((void));
|
||||
extern tree get_identifier PROTO((char *));
|
||||
extern void pedwarn PROTO((char *, ...));
|
||||
extern void sorry PROTO((char *, ...));
|
||||
extern void warning PROTO((char *, ...));
|
||||
|
||||
extern struct obstack *expression_obstack, permanent_obstack;
|
||||
extern struct obstack *current_obstack, *saveable_obstack;
|
||||
|
||||
|
@ -337,6 +325,8 @@ build_cause_exception (exp_name, warn_if_unhandled)
|
|||
if (lineno == NULL_TREE)
|
||||
lineno = error_mark_node;
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
}
|
||||
result =
|
||||
build_chill_function_call (function,
|
||||
|
@ -849,8 +839,8 @@ update_else_range_for_range (else_range, low_target, high_target)
|
|||
{
|
||||
low_range_val = TREE_INT_CST_LOW (TREE_PURPOSE (this_range));
|
||||
high_range_val = TREE_INT_CST_LOW (TREE_VALUE (this_range));
|
||||
if (low_target_val >= low_range_val && low_target_val <= high_range_val
|
||||
|| high_target_val >= low_range_val && high_target_val <= high_range_val)
|
||||
if ((low_target_val >= low_range_val && low_target_val <= high_range_val)
|
||||
|| (high_target_val >= low_range_val && high_target_val <= high_range_val))
|
||||
break;
|
||||
prev_range = this_range;
|
||||
}
|
||||
|
@ -1305,7 +1295,7 @@ static tree
|
|||
chill_handle_multi_case_label_list (selector, labels)
|
||||
tree selector, labels;
|
||||
{
|
||||
tree one_label, selector_value, larg, rarg;
|
||||
tree one_label, larg, rarg;
|
||||
|
||||
one_label = TREE_VALUE (labels);
|
||||
larg = chill_handle_multi_case_label (selector, TREE_VALUE (one_label));
|
||||
|
@ -1352,9 +1342,6 @@ build_multi_case_selector_expression (selector_list, label_spec)
|
|||
((ARRAY)[(unsigned)(INDEX) / HOST_BITS_PER_CHAR]\
|
||||
|= 1 << ((unsigned)(INDEX) % HOST_BITS_PER_CHAR))
|
||||
|
||||
extern HOST_WIDE_INT all_cases_count PROTO((tree, int*));
|
||||
extern void mark_seen_cases PROTO((tree, unsigned char*, long, int));
|
||||
|
||||
/* CASES_SEEN is a set (bitarray) of length COUNT.
|
||||
For each element that is zero, print an error message,
|
||||
assume the element have the given TYPE. */
|
||||
|
@ -1388,9 +1375,9 @@ print_missing_cases (type, cases_seen, count)
|
|||
break;
|
||||
case CHAR_TYPE:
|
||||
if ((x >= ' ' && x < 127) && x != '\'' && x != '^')
|
||||
sprintf (buf, "'%c'", x);
|
||||
sprintf (buf, "'%c'", (char)x);
|
||||
else
|
||||
sprintf (buf, "'^(%d)'", x);
|
||||
sprintf (buf, "'^(%ld)'", x);
|
||||
err_val_name = buf;
|
||||
j = i;
|
||||
while (j < count && !BITARRAY_TEST(cases_seen, j))
|
||||
|
@ -1400,9 +1387,9 @@ print_missing_cases (type, cases_seen, count)
|
|||
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, y);
|
||||
sprintf (err_val_name, "%s:'%c'", buf, (char)y);
|
||||
else
|
||||
sprintf (err_val_name, "%s:'^(%d)'", buf, y);
|
||||
sprintf (err_val_name, "%s:'^(%ld)'", buf, y);
|
||||
i = j - 1;
|
||||
}
|
||||
break;
|
||||
|
@ -1417,9 +1404,9 @@ print_missing_cases (type, cases_seen, count)
|
|||
while (j < count && !BITARRAY_TEST(cases_seen, j))
|
||||
j++;
|
||||
if (j == i + 1)
|
||||
sprintf (buf, "%d", x);
|
||||
sprintf (buf, "%ld", x);
|
||||
else
|
||||
sprintf (buf, "%d:%d", x, x+j-i-1);
|
||||
sprintf (buf, "%ld:%ld", x, x+j-i-1);
|
||||
i = j - 1;
|
||||
err_val_name = buf;
|
||||
break;
|
||||
|
|
|
@ -20,8 +20,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||
#ifndef _CH_TREE_H
|
||||
#define _CH_TREE_H
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/* Usage of TREE_LANG_FLAG_?:
|
||||
1: TUPLE_NAMED_FIELD
|
||||
" TYPE_FIELDS_READONLY (in ARRAY_TYPE, RECORD_TYPE or UNION_TYPE)
|
||||
|
@ -643,7 +641,9 @@ extern tree combine_strings PROTO((tree));
|
|||
extern void constant_expression_warning PROTO((tree));
|
||||
extern void decl_attributes PROTO((tree, tree));
|
||||
extern void declare_function_name PROTO((void));
|
||||
#ifdef BUFSIZ
|
||||
extern char *get_directive_line PROTO((FILE *));
|
||||
#endif
|
||||
extern tree shorten_compare PROTO((tree *, tree *, tree *, enum tree_code *));
|
||||
|
||||
/* in c-decl.c */
|
||||
|
@ -718,9 +718,11 @@ extern void parmlist_tags_warning PROTO((void));
|
|||
extern void pending_xref_error PROTO((void));
|
||||
extern void pop_chill_function_context PROTO((void));
|
||||
extern tree poplevel PROTO((int, int, int));
|
||||
#ifdef BUFSIZ
|
||||
extern void print_lang_decl PROTO((FILE *,tree, int));
|
||||
extern void print_lang_identifier PROTO((FILE *,tree, int));
|
||||
extern void print_lang_type PROTO((FILE *,tree, int));
|
||||
#endif
|
||||
extern void push_chill_function_context PROTO((void));
|
||||
extern void push_parm_decl PROTO((tree));
|
||||
extern tree pushdecl PROTO((tree));
|
||||
|
@ -783,6 +785,7 @@ extern tree build_chill_binary_op PROTO((enum chill_tree_code, tre
|
|||
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_function_call PROTO((tree, tree));
|
||||
extern tree build_chill_length PROTO((tree));
|
||||
extern tree build_chill_indirect_ref PROTO((tree, tree, int));
|
||||
|
@ -807,11 +810,13 @@ extern void chill_check_decl PROTO((tree));
|
|||
extern tree chill_convert_for_assignment PROTO((tree, tree, 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 void chill_handle_case_label PROTO((tree, tree));
|
||||
extern int chill_varying_string_type_p PROTO((tree));
|
||||
extern int chill_varying_type_p PROTO((tree));
|
||||
extern int ch_singleton_set PROTO((tree));
|
||||
extern tree check_expression PROTO((tree, tree, tree));
|
||||
extern void check_missing_cases PROTO((tree));
|
||||
extern tree check_non_null PROTO((tree));
|
||||
extern tree check_range PROTO((tree, tree, tree,tree));
|
||||
extern void cond_type_range_exception PROTO((tree));
|
||||
|
@ -841,37 +846,52 @@ extern void do_chill_outparms PROTO((void));
|
|||
extern tree do_decl PROTO((tree, tree, int, int, tree, int));
|
||||
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 tree finish_enum PROTO((tree, tree));
|
||||
extern void fixup_chill_parms PROTO((tree));
|
||||
extern void finish_outer_function PROTO((void));
|
||||
extern unsigned get_type_precision PROTO((tree, tree));
|
||||
extern tree grok_chill_fixedfields PROTO((tree, tree, tree));
|
||||
extern tree grok_chill_variantdefs PROTO((tree, tree, tree));
|
||||
extern void layout_enum PROTO((tree));
|
||||
/* extern tree lookup_remembered_decl PROTO((HOST_WIDE_INT, tree)); */
|
||||
extern void lookup_and_expand_goto PROTO((tree));
|
||||
extern tree lookup_tag_fields PROTO((tree, tree));
|
||||
extern void lookup_and_handle_exit PROTO((tree));
|
||||
extern tree massage_param_node PROTO((tree, tree));
|
||||
extern void pop_module PROTO((void));
|
||||
extern void print_mode PROTO((tree));
|
||||
extern tree push_extern_function PROTO((tree, tree, tree, tree, int));
|
||||
extern void push_extern_process PROTO((tree, tree, tree, int));
|
||||
extern void push_extern_signal PROTO((tree, tree, tree));
|
||||
extern void push_granted PROTO((tree, tree));
|
||||
extern tree push_modedef PROTO((tree, tree, int));
|
||||
extern tree push_module PROTO((tree, int));
|
||||
extern void push_parms PROTO((tree, tree, tree));
|
||||
extern void push_syndecl PROTO((tree, tree, tree));
|
||||
extern int result_never_set;
|
||||
extern void save_expr_under_name PROTO((tree, tree));
|
||||
extern tree set_module_name PROTO((tree));
|
||||
extern int start_chill_function PROTO((tree, tree, tree, tree, tree));
|
||||
extern void start_outer_function PROTO((void));
|
||||
extern void switch_to_pass_2 PROTO((void));
|
||||
|
||||
/* in ch/except.c */
|
||||
extern void chill_check_no_handlers PROTO((void));
|
||||
extern void chill_finish_on PROTO((void));
|
||||
extern void chill_handle_on_labels PROTO((tree));
|
||||
extern void chill_reraise_exceptions PROTO((tree));
|
||||
extern void chill_start_default_handler PROTO((void));
|
||||
extern void chill_start_on PROTO((void));
|
||||
extern void expand_goto_except_cleanup PROTO((int));
|
||||
extern int is_handled PROTO((tree));
|
||||
|
||||
/* in ch/expr.c */
|
||||
extern tree build_chill_addr_expr PROTO((tree, 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));
|
||||
extern tree build_chill_descr PROTO((tree));
|
||||
extern void build_chill_descr_type PROTO((void));
|
||||
extern void build_chill_inttime_type PROTO((void));
|
||||
|
@ -900,6 +920,7 @@ extern void start_outer_function PROTO((void));
|
|||
extern void finish_chill_seize PROTO((tree));
|
||||
extern void chill_grant PROTO((tree,tree, tree, tree));
|
||||
extern void set_default_grant_file PROTO((void));
|
||||
extern void set_identifier_size PROTO((int));
|
||||
extern void write_grant_file PROTO((void));
|
||||
extern void write_spec_module PROTO((tree, tree));
|
||||
|
||||
|
@ -982,6 +1003,7 @@ extern tree build_chill_variable PROTO((tree));
|
|||
extern tree build_chill_writeable PROTO((tree));
|
||||
extern tree build_chill_writerecord PROTO((tree, tree));
|
||||
extern tree build_chill_writetext PROTO((tree, tree));
|
||||
extern void build_enum_tables PROTO((void));
|
||||
extern tree build_text_mode PROTO((tree, tree, int));
|
||||
extern tree check_text_length PROTO((tree, tree));
|
||||
extern void init_access_location PROTO((tree, tree));
|
||||
|
@ -1048,6 +1070,9 @@ extern tree get_tasking_code_name PROTO((tree));
|
|||
extern tree make_process_struct PROTO((tree, tree));
|
||||
extern tree make_signal_struct PROTO((tree));
|
||||
extern tree max_queue_size PROTO((tree));
|
||||
extern void tasking_init PROTO((void));
|
||||
extern void tasking_registry PROTO((void));
|
||||
extern void tasking_setup PROTO((void));
|
||||
|
||||
/* in ch/timing.c */
|
||||
extern tree abs_timing_type_node;
|
||||
|
@ -1097,6 +1122,7 @@ extern ch_class chill_resulting_class PROTO((ch_class, ch_class));
|
|||
extern tree chill_resulting_mode PROTO((tree, tree));
|
||||
extern int chill_similar PROTO((tree, tree, struct mode_chain*));
|
||||
extern int discrete_type_p PROTO((tree));
|
||||
extern tree initializer_constant_valid_p PROTO((tree, tree));
|
||||
extern tree convert_to_discrete PROTO((tree));
|
||||
extern tree smash_dummy_type PROTO((tree));
|
||||
extern tree string_assignment_condition PROTO((tree, tree));
|
||||
|
|
|
@ -24,14 +24,14 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||
but what kind of conversions it does will depend on the language. */
|
||||
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "tree.h"
|
||||
#include "ch-tree.h"
|
||||
#include "flags.h"
|
||||
#include "convert.h"
|
||||
#include "lex.h"
|
||||
#include "toplev.h"
|
||||
|
||||
extern void error PROTO((char *, ...));
|
||||
extern tree initializer_constant_valid_p PROTO((tree, tree));
|
||||
extern tree bit_one_node, bit_zero_node;
|
||||
extern tree string_one_type_node;
|
||||
extern tree bitstring_one_type_node;
|
||||
|
@ -932,7 +932,6 @@ convert (type, expr)
|
|||
{
|
||||
register tree e = expr;
|
||||
register enum chill_tree_code code;
|
||||
char *errstr;
|
||||
int type_varying;
|
||||
|
||||
if (e == NULL_TREE || TREE_CODE (e) == ERROR_MARK)
|
||||
|
|
|
@ -179,8 +179,8 @@
|
|||
/* ??? not all decl nodes are given the most useful possible
|
||||
line numbers. For example, the CONST_DECLs for enum values. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "tree.h"
|
||||
#include "flags.h"
|
||||
#include "ch-tree.h"
|
||||
|
@ -188,6 +188,7 @@
|
|||
#include "obstack.h"
|
||||
#include "input.h"
|
||||
#include "rtl.h"
|
||||
#include "toplev.h"
|
||||
|
||||
#define IS_UNKNOWN_TYPE(type) (TYPE_SIZE(type)==0)
|
||||
#define BUILTIN_NESTING_LEVEL (-1)
|
||||
|
@ -203,30 +204,12 @@ extern struct obstack *saveable_obstack;
|
|||
extern tree signal_code;
|
||||
extern int special_UC;
|
||||
|
||||
extern void tasking_init PROTO((void));
|
||||
extern void error PROTO((char *, ...));
|
||||
extern void error_with_decl PROTO((tree, char *, ...));
|
||||
extern void expand_decl PROTO((tree));
|
||||
static tree get_next_decl PROTO((void));
|
||||
extern tree get_parm_decls PROTO((void));
|
||||
extern void end_temporary_allocation PROTO((void));
|
||||
extern void indent_to PROTO((FILE *, int));
|
||||
#ifdef RTX_CODE
|
||||
extern rtx label_rtx PROTO((tree));
|
||||
static tree lookup_name_for_seizing PROTO((tree));
|
||||
#if 0
|
||||
static tree lookup_name_current_level PROTO((tree));
|
||||
#endif
|
||||
extern tree lookup_name_for_seizing PROTO((tree));
|
||||
extern tree lookup_name_current_level PROTO((tree));
|
||||
extern int operand_equal_p PROTO((tree, tree, int));
|
||||
extern void pedwarn_with_decl PROTO((tree, char *, ...));
|
||||
extern void print_node PROTO((FILE *, char *, tree, int));
|
||||
extern void push_granted PROTO((tree, tree));
|
||||
extern void push_obstacks PROTO((struct obstack *, struct obstack *));
|
||||
extern void rest_of_decl_compilation PROTO((tree, char *, int, int));
|
||||
extern void sorry PROTO((char *, ...));
|
||||
static void save_decl PROTO((tree));
|
||||
extern void start_identifier_warnings PROTO((void));
|
||||
extern void temporary_allocation PROTO((void));
|
||||
extern void warning PROTO((char *, ...));
|
||||
|
||||
extern struct obstack permanent_obstack;
|
||||
extern int in_pseudo_module;
|
||||
|
@ -547,7 +530,9 @@ struct scope
|
|||
|
||||
/* The outermost binding level, for pre-defined (builtin) names. */
|
||||
|
||||
static struct scope builtin_scope = { NULL, NULL, NULL_TREE};
|
||||
static struct scope builtin_scope = {
|
||||
NULL, NULL, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE,
|
||||
NULL_TREE, NULL_TREE, NULL, 0, 0, NULL, NULL, NULL};
|
||||
|
||||
struct scope *global_scope;
|
||||
|
||||
|
@ -560,21 +545,14 @@ struct scope *last_scope = &builtin_scope;
|
|||
|
||||
/* Binding level structures are initialized by copying this one. */
|
||||
|
||||
static struct scope clear_scope
|
||||
= {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0};
|
||||
static struct scope clear_scope = {
|
||||
NULL, NULL, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE,
|
||||
NULL_TREE, NULL_TREE, NULL, 0, 0, NULL, NULL, NULL};
|
||||
|
||||
/* Chain of decls accessible through IDENTIFIER_OUTER_VALUE.
|
||||
Decls with the same DECL_NAME are adjacent in the chain. */
|
||||
|
||||
static tree outer_decls = NULL_TREE;
|
||||
|
||||
/* Forward declarations. */
|
||||
|
||||
tree pushdecl ();
|
||||
tree builtin_function ();
|
||||
|
||||
tree lookup_name_current_level ();
|
||||
static void layout_array_type ();
|
||||
|
||||
/* C-specific option variables. */
|
||||
|
||||
|
@ -730,14 +708,14 @@ tree ALL_POSTFIX;
|
|||
|
||||
void
|
||||
allocate_lang_decl (t)
|
||||
tree t;
|
||||
tree t ATTRIBUTE_UNUSED;
|
||||
{
|
||||
/* Nothing needed */
|
||||
}
|
||||
|
||||
void
|
||||
copy_lang_decl (node)
|
||||
tree node;
|
||||
tree node ATTRIBUTE_UNUSED;
|
||||
{
|
||||
/* Nothing needed */
|
||||
}
|
||||
|
@ -757,7 +735,7 @@ build_lang_decl (code, name, type)
|
|||
|
||||
int
|
||||
c_decode_option (argc, argv)
|
||||
int argc;
|
||||
int argc ATTRIBUTE_UNUSED;
|
||||
char **argv;
|
||||
{
|
||||
char *p = argv[0];
|
||||
|
@ -1342,8 +1320,8 @@ build_chill_function_type (return_type, argtypes, exceptions, recurse_p)
|
|||
*/
|
||||
tree
|
||||
push_extern_function (name, typespec, argtypes, exceptions, granting)
|
||||
tree name, typespec, argtypes, exceptions;
|
||||
int granting; /* If 0 do pushdecl(); if 1 do push_granted(). */
|
||||
tree name, typespec, argtypes, exceptions;
|
||||
int granting ATTRIBUTE_UNUSED;/*If 0 do pushdecl(); if 1 do push_granted()*/
|
||||
{
|
||||
tree ftype, fndecl;
|
||||
|
||||
|
@ -2211,7 +2189,9 @@ get_next_decl ()
|
|||
void
|
||||
switch_to_pass_2 ()
|
||||
{
|
||||
#if 0
|
||||
extern int errorcount, sorrycount;
|
||||
#endif
|
||||
if (current_scope != &builtin_scope)
|
||||
abort ();
|
||||
last_scope = &builtin_scope;
|
||||
|
@ -3163,7 +3143,6 @@ tree
|
|||
pushdecl (x)
|
||||
tree x;
|
||||
{
|
||||
register tree t;
|
||||
register tree name = DECL_NAME (x);
|
||||
register struct scope *b = current_scope;
|
||||
|
||||
|
@ -3336,9 +3315,10 @@ lookup_name (name)
|
|||
return val;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* Similar to `lookup_name' but look only at current binding level. */
|
||||
|
||||
tree
|
||||
static tree
|
||||
lookup_name_current_level (name)
|
||||
tree name;
|
||||
{
|
||||
|
@ -3347,8 +3327,9 @@ lookup_name_current_level (name)
|
|||
return val;
|
||||
return NULL_TREE;
|
||||
}
|
||||
#endif
|
||||
|
||||
tree
|
||||
static tree
|
||||
lookup_name_for_seizing (seize_decl)
|
||||
tree seize_decl;
|
||||
{
|
||||
|
@ -4320,7 +4301,6 @@ void
|
|||
finish_decl (decl)
|
||||
tree decl;
|
||||
{
|
||||
register tree type = TREE_TYPE (decl);
|
||||
int was_incomplete = (DECL_SIZE (decl) == 0);
|
||||
int temporary = allocation_temporary_p ();
|
||||
|
||||
|
@ -4425,7 +4405,7 @@ finish_decl (decl)
|
|||
|
||||
tree
|
||||
maybe_build_cleanup (decl)
|
||||
tree decl;
|
||||
tree decl ATTRIBUTE_UNUSED;
|
||||
{
|
||||
/* There are no cleanups in C. */
|
||||
return NULL_TREE;
|
||||
|
@ -4437,8 +4417,8 @@ maybe_build_cleanup (decl)
|
|||
|
||||
int
|
||||
complete_array_type (type, initial_value, do_default)
|
||||
tree type, initial_value;
|
||||
int do_default;
|
||||
tree type ATTRIBUTE_UNUSED, initial_value ATTRIBUTE_UNUSED;
|
||||
int do_default ATTRIBUTE_UNUSED;
|
||||
{
|
||||
/* Only needed so we can link with ../c-typeck.c. */
|
||||
abort ();
|
||||
|
@ -4454,7 +4434,7 @@ complete_array_type (type, initial_value, do_default)
|
|||
tree
|
||||
start_struct (code, name)
|
||||
enum chill_tree_code code;
|
||||
tree name;
|
||||
tree name ATTRIBUTE_UNUSED;
|
||||
{
|
||||
/* If there is already a tag defined at this binding level
|
||||
(as a forward reference), just return it. */
|
||||
|
@ -4538,7 +4518,7 @@ layout_array_type (t)
|
|||
|
||||
tree
|
||||
start_enum (name)
|
||||
tree name;
|
||||
tree name ATTRIBUTE_UNUSED;
|
||||
{
|
||||
register tree enumtype;
|
||||
|
||||
|
@ -5075,8 +5055,6 @@ void
|
|||
shadow_record_fields (struct_val)
|
||||
tree struct_val;
|
||||
{
|
||||
tree type, parent;
|
||||
|
||||
if (pass == 1 || struct_val == NULL_TREE)
|
||||
return;
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||
#include "tree.h"
|
||||
#include "ch-tree.h"
|
||||
#include "rtl.h"
|
||||
#include "toplev.h"
|
||||
|
||||
/* On Suns this can get you to the right definition if you
|
||||
set the right value for TARGET. */
|
||||
|
@ -51,13 +52,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||
#endif
|
||||
|
||||
extern int expand_exit_needed;
|
||||
extern tree build_chill_exception_decl PROTO((char *));
|
||||
extern void chill_handle_case_default PROTO((void));
|
||||
extern void emit_jump PROTO((rtx));
|
||||
extern void expand_decl PROTO((tree));
|
||||
extern void fatal PROTO((char *, ...));
|
||||
extern void make_decl_rtl PROTO((tree, char *, int));
|
||||
extern void rest_of_decl_compilation PROTO((tree, char *, int, int));
|
||||
|
||||
static tree link_handler_decl;
|
||||
static tree handler_link_pointer_type;
|
||||
|
|
|
@ -20,7 +20,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include "system.h"
|
||||
#include "rtl.h"
|
||||
#include "tree.h"
|
||||
#include "flags.h"
|
||||
|
@ -29,10 +29,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||
#include "assert.h"
|
||||
#include "lex.h"
|
||||
#include "convert.h"
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
#include "toplev.h"
|
||||
|
||||
extern char **boolean_code_name;
|
||||
extern int flag_old_strings;
|
||||
|
@ -40,15 +37,6 @@ extern tree long_unsigned_type_node;
|
|||
extern int ignore_case;
|
||||
extern int special_UC;
|
||||
|
||||
extern void check_for_full_enumeration_handling PROTO((tree));
|
||||
extern void chill_handle_case_default PROTO((void));
|
||||
extern void error PROTO((char *, ...));
|
||||
extern void error_with_decl PROTO((tree, char *, ...));
|
||||
extern void fatal PROTO((char *, ...));
|
||||
extern void sorry PROTO((char *, ...));
|
||||
extern tree stabilize_reference PROTO((tree));
|
||||
extern void warning PROTO((char *, ...));
|
||||
|
||||
/* definitions for duration built-ins */
|
||||
#define MILLISECS_MULTIPLIER 1
|
||||
#define SECS_MULTIPLIER MILLISECS_MULTIPLIER * 1000
|
||||
|
@ -557,7 +545,6 @@ chill_expand_expr (exp, target, tmode, modifier)
|
|||
|
||||
case SET_IN_EXPR:
|
||||
{
|
||||
extern tree lookup_name PROTO((tree));
|
||||
tree set = TREE_OPERAND (exp, 1);
|
||||
tree pos = convert (long_unsigned_type_node, TREE_OPERAND (exp, 0));
|
||||
tree set_type = TREE_TYPE (set);
|
||||
|
@ -602,7 +589,6 @@ chill_expand_expr (exp, target, tmode, modifier)
|
|||
|
||||
case PACKED_ARRAY_REF:
|
||||
{
|
||||
extern tree lookup_name PROTO((tree));
|
||||
tree array = TREE_OPERAND (exp, 0);
|
||||
tree pos = save_expr (TREE_OPERAND (exp, 1));
|
||||
tree array_type = TREE_TYPE (array);
|
||||
|
@ -679,7 +665,7 @@ check_arglist_length (args, min_length, max_length, name)
|
|||
static tree
|
||||
internal_build_compound_expr (list, first_p)
|
||||
tree list;
|
||||
int first_p;
|
||||
int first_p ATTRIBUTE_UNUSED;
|
||||
{
|
||||
register tree rest;
|
||||
|
||||
|
@ -1564,7 +1550,7 @@ build_allocate_getstack (mode, value, chill_name, fnname, filename, linenumber)
|
|||
{
|
||||
tree type, result;
|
||||
tree expr = NULL_TREE;
|
||||
tree args, tmpvar, fncall, ptr, init, outlist = NULL_TREE;
|
||||
tree args, tmpvar, fncall, ptr, outlist = NULL_TREE;
|
||||
|
||||
if (mode == NULL_TREE || TREE_CODE (mode) == ERROR_MARK)
|
||||
return error_mark_node;
|
||||
|
@ -2125,7 +2111,6 @@ build_chill_pred_or_succ (expr, op)
|
|||
{
|
||||
struct ch_class class;
|
||||
tree etype, cond;
|
||||
tree limit;
|
||||
|
||||
if (pass == 1)
|
||||
return NULL_TREE;
|
||||
|
@ -3241,7 +3226,7 @@ varying_to_slice (exp)
|
|||
if (!chill_varying_type_p (TREE_TYPE (exp)))
|
||||
return exp;
|
||||
else
|
||||
{ tree size, data, data_domain, doamin, min;
|
||||
{ tree size, data, data_domain, min;
|
||||
tree novelty = CH_NOVELTY (TREE_TYPE (exp));
|
||||
exp = save_if_needed (exp);
|
||||
size = build_component_ref (exp, var_length_id);
|
||||
|
@ -3732,8 +3717,6 @@ finish_chill_binary_op (node)
|
|||
tree op1 = check_have_mode (TREE_OPERAND (node, 1), "binary expression");
|
||||
tree type0 = TREE_TYPE (op0);
|
||||
tree type1 = TREE_TYPE (op1);
|
||||
enum tree_code code0;
|
||||
enum tree_code code1;
|
||||
tree folded;
|
||||
|
||||
if (TREE_CODE (op0) == ERROR_MARK || TREE_CODE (op1) == ERROR_MARK)
|
||||
|
@ -3902,8 +3885,6 @@ finish_chill_binary_op (node)
|
|||
return error_mark_node;
|
||||
}
|
||||
|
||||
|
||||
finish:
|
||||
if (TREE_TYPE (node) == NULL_TREE)
|
||||
{
|
||||
struct ch_class class;
|
||||
|
@ -3922,23 +3903,26 @@ finish_chill_binary_op (node)
|
|||
TREE_CONSTANT (folded) = TREE_CONSTANT (op0) & TREE_CONSTANT (op1);
|
||||
#endif
|
||||
if (TREE_CODE (node) == TRUNC_DIV_EXPR)
|
||||
if (TREE_CONSTANT (op1))
|
||||
{
|
||||
if (tree_int_cst_equal (op1, integer_zero_node))
|
||||
{
|
||||
error ("division by zero");
|
||||
return integer_zero_node;
|
||||
}
|
||||
}
|
||||
else if (range_checking)
|
||||
{
|
||||
{
|
||||
if (TREE_CONSTANT (op1))
|
||||
{
|
||||
if (tree_int_cst_equal (op1, integer_zero_node))
|
||||
{
|
||||
error ("division by zero");
|
||||
return integer_zero_node;
|
||||
}
|
||||
}
|
||||
else if (range_checking)
|
||||
{
|
||||
#if 0
|
||||
tree test = build (EQ_EXPR, boolean_type_node, op1, integer_zero_node);
|
||||
/* Should this be overflow? */
|
||||
folded = check_expression (folded, test,
|
||||
ridpointers[(int) RID_RANGEFAIL]);
|
||||
tree test =
|
||||
build (EQ_EXPR, boolean_type_node, op1, integer_zero_node);
|
||||
/* Should this be overflow? */
|
||||
folded = check_expression (folded, test,
|
||||
ridpointers[(int) RID_RANGEFAIL]);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
return folded;
|
||||
}
|
||||
|
||||
|
@ -4035,7 +4019,7 @@ build_chill_addr_expr (ref, errormsg)
|
|||
if (! CH_LOCATION_P (ref)
|
||||
&& TREE_CODE (TREE_TYPE (ref)) != FUNCTION_TYPE)
|
||||
{
|
||||
error ("ADDR parameter must be a LOCATION", errormsg);
|
||||
error ("ADDR parameter must be a LOCATION");
|
||||
return error_mark_node;
|
||||
}
|
||||
ref = build_chill_arrow_expr (ref, 1);
|
||||
|
@ -4358,8 +4342,6 @@ build_chill_unary_op (code, op0)
|
|||
tree op0;
|
||||
{
|
||||
register tree result = NULL_TREE;
|
||||
struct ch_class class;
|
||||
tree type0 = TREE_TYPE (op0);
|
||||
|
||||
if (op0 == NULL_TREE || TREE_CODE (op0) == ERROR_MARK)
|
||||
return error_mark_node;
|
||||
|
@ -4482,8 +4464,6 @@ tree
|
|||
powersetlen (powerset)
|
||||
tree powerset;
|
||||
{
|
||||
tree domain, temp;
|
||||
|
||||
if (powerset == NULL_TREE || TREE_CODE (powerset) == ERROR_MARK)
|
||||
return error_mark_node;
|
||||
|
||||
|
|
|
@ -17,24 +17,18 @@ 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. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "tree.h"
|
||||
#include "ch-tree.h"
|
||||
#include "lex.h"
|
||||
#include "flags.h"
|
||||
#include "actions.h"
|
||||
#include "input.h"
|
||||
#include "errno.h"
|
||||
#include "rtl.h"
|
||||
#include "tasking.h"
|
||||
|
||||
/* Disable possible macro over-rides, so the externs parse
|
||||
portably. */
|
||||
#undef strchr
|
||||
#undef strrchr
|
||||
#include "toplev.h"
|
||||
#include "output.h"
|
||||
|
||||
#define APPEND(X,Y) X = append (X, Y)
|
||||
#define PREPEND(X,Y) X = prepend (X, Y);
|
||||
|
@ -49,16 +43,7 @@ do \
|
|||
APPEND (X, ";\n"); \
|
||||
} while (0)
|
||||
|
||||
extern void assemble_constructor PROTO((char *));
|
||||
extern void assemble_name PROTO((FILE *, char *));
|
||||
extern void error PROTO((char *, ...));
|
||||
extern tree tasking_list;
|
||||
extern void tasking_registry PROTO((void));
|
||||
extern void tasking_setup PROTO((void));
|
||||
extern void build_enum_tables PROTO((void));
|
||||
extern tree process_type;
|
||||
extern void warning PROTO((char *, ...));
|
||||
extern tree get_file_function_name PROTO((int));
|
||||
extern char *asm_file_name;
|
||||
extern char *dump_base_name;
|
||||
|
||||
|
@ -1988,8 +1973,6 @@ decode_constant_selective (init, all_decls)
|
|||
MYSTRING *tmp_string;
|
||||
tree type = TREE_TYPE (init);
|
||||
tree val = init;
|
||||
char *op;
|
||||
char wrk[256];
|
||||
MYSTRING *mode_string;
|
||||
|
||||
switch ((enum chill_tree_code)TREE_CODE (val))
|
||||
|
@ -2650,7 +2633,6 @@ write_grant_file ()
|
|||
p = gstring->str;
|
||||
while (*p)
|
||||
{
|
||||
extern char* strchr ();
|
||||
p1 = strchr (p, '\n');
|
||||
c = *++p1;
|
||||
*p1 = '\0';
|
||||
|
@ -2677,8 +2659,6 @@ write_grant_file ()
|
|||
void
|
||||
set_default_grant_file ()
|
||||
{
|
||||
#undef strrchr
|
||||
extern char *strrchr ();
|
||||
char *p, *tmp, *fname;
|
||||
|
||||
if (dump_base_name)
|
||||
|
@ -2721,7 +2701,7 @@ set_default_grant_file ()
|
|||
|
||||
void
|
||||
push_granted (name, decl)
|
||||
tree name, decl;
|
||||
tree name ATTRIBUTE_UNUSED, decl ATTRIBUTE_UNUSED;
|
||||
{
|
||||
#if 0
|
||||
IDENTIFIER_GRANTED_VALUE (name) = decl;
|
||||
|
|
|
@ -17,10 +17,8 @@
|
|||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "tree.h"
|
||||
#include "ch-tree.h"
|
||||
#include "rtl.h"
|
||||
|
@ -28,6 +26,7 @@
|
|||
#include "flags.h"
|
||||
#include "input.h"
|
||||
#include "assert.h"
|
||||
#include "toplev.h"
|
||||
|
||||
/* set non-zero if input text is forced to lowercase */
|
||||
extern int ignore_case;
|
||||
|
@ -35,12 +34,6 @@ extern int ignore_case;
|
|||
/* set non-zero if special words are to be entered in uppercase */
|
||||
extern int special_UC;
|
||||
|
||||
extern void error PROTO((char *, ...));
|
||||
extern void sorry PROTO((char *, ...));
|
||||
extern void warning PROTO((char *, ...));
|
||||
|
||||
extern tree build_chill_compound_expr PROTO((tree));
|
||||
|
||||
static int intsize_of_charsexpr PROTO((tree));
|
||||
|
||||
/* association mode */
|
||||
|
@ -1722,7 +1715,7 @@ textlocation_mode (text)
|
|||
field = TYPE_FIELDS (text);
|
||||
for ( ; field != NULL_TREE; field = TREE_CHAIN (field))
|
||||
{
|
||||
if (TREE_CODE (field) == FIELD_DECL &
|
||||
if (TREE_CODE (field) == FIELD_DECL &&
|
||||
DECL_NAME (field) == get_identifier ("tloc"))
|
||||
return TREE_TYPE (field);
|
||||
}
|
||||
|
@ -4161,7 +4154,6 @@ scanformcont (fcs, len, fcsptr, lenptr, exprlist, exprptr,
|
|||
break;
|
||||
}
|
||||
|
||||
do_the_action: ;
|
||||
state = FormatText;
|
||||
break;
|
||||
|
||||
|
|
|
@ -19,11 +19,12 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||
|
||||
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "tree.h"
|
||||
#include "ch-tree.h"
|
||||
#include "lex.h"
|
||||
#include <stdio.h>
|
||||
#include "input.h"
|
||||
#include "toplev.h"
|
||||
|
||||
/* Type node for boolean types. */
|
||||
|
||||
|
@ -49,14 +50,6 @@ char* chill_real_input_filename;
|
|||
extern FILE* finput;
|
||||
|
||||
extern int maximum_field_alignment;
|
||||
|
||||
extern void error PROTO((char *, ...));
|
||||
extern void error_with_decl PROTO((tree, char *, ...));
|
||||
extern void fatal PROTO((char *, ...));
|
||||
extern int floor_log2_wide PROTO((unsigned HOST_WIDE_INT));
|
||||
extern void pedwarn_with_decl PROTO((tree, char *, ...));
|
||||
extern void sorry PROTO((char *, ...));
|
||||
extern int type_hash_list PROTO((tree));
|
||||
|
||||
/* return 1 if the expression tree given has all
|
||||
constant nodes as its leaves; return 0 otherwise. */
|
||||
|
@ -111,14 +104,14 @@ const_expr (exp)
|
|||
/* Used by c-lex.c, but only for objc. */
|
||||
tree
|
||||
lookup_interface (arg)
|
||||
tree arg;
|
||||
tree arg ATTRIBUTE_UNUSED;
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
maybe_objc_comptypes (lhs, rhs)
|
||||
tree lhs, rhs;
|
||||
tree lhs ATTRIBUTE_UNUSED, rhs ATTRIBUTE_UNUSED;
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
@ -144,9 +137,9 @@ lang_init_options ()
|
|||
|
||||
void
|
||||
lang_print_xnode (file, node, indent)
|
||||
FILE *file;
|
||||
tree node;
|
||||
int indent;
|
||||
FILE *file ATTRIBUTE_UNUSED;
|
||||
tree node ATTRIBUTE_UNUSED;
|
||||
int indent ATTRIBUTE_UNUSED;
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -171,7 +164,7 @@ lang_decode_option (argc, argv)
|
|||
char **argv;
|
||||
{
|
||||
char *p = argv[0];
|
||||
static explicit_ignore_case = 0;
|
||||
static int explicit_ignore_case = 0;
|
||||
if (!strcmp(p, "-lang-chill"))
|
||||
; /* do nothing */
|
||||
else if (!strcmp (p, "-fruntime-checking"))
|
||||
|
@ -280,8 +273,8 @@ chill_print_error_function (file)
|
|||
|
||||
void
|
||||
incomplete_type_error (value, type)
|
||||
tree value;
|
||||
tree type;
|
||||
tree value ATTRIBUTE_UNUSED;
|
||||
tree type ATTRIBUTE_UNUSED;
|
||||
{
|
||||
error ("internal error - use of undefined type");
|
||||
}
|
||||
|
|
104
gcc/ch/lex.c
104
gcc/ch/lex.c
|
@ -17,14 +17,11 @@ 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. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include <setjmp.h>
|
||||
#include <ctype.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "tree.h"
|
||||
#include "input.h"
|
||||
|
||||
|
@ -33,24 +30,24 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||
#include "flags.h"
|
||||
#include "parse.h"
|
||||
#include "obstack.h"
|
||||
#include "toplev.h"
|
||||
|
||||
#ifdef MULTIBYTE_CHARS
|
||||
#include <stdlib.h>
|
||||
#include <locale.h>
|
||||
#endif
|
||||
|
||||
/* include the keyword recognizers */
|
||||
#include "hash.h"
|
||||
|
||||
#undef strchr
|
||||
|
||||
FILE* finput;
|
||||
|
||||
#if 0
|
||||
static int last_token = 0;
|
||||
/* Sun's C compiler warns about the safer sequence
|
||||
do { .. } while 0
|
||||
when there's a 'return' inside the braces, so don't use it */
|
||||
#define RETURN_TOKEN(X) { last_token = X; return (X); }
|
||||
#endif
|
||||
|
||||
/* This is set non-zero to force incoming tokens to lowercase. */
|
||||
extern int ignore_case;
|
||||
|
@ -64,23 +61,6 @@ extern int special_UC;
|
|||
extern struct obstack permanent_obstack;
|
||||
extern struct obstack temporary_obstack;
|
||||
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
extern tree build_string_type PROTO((tree, tree));
|
||||
extern void error PROTO((char *, ...));
|
||||
extern void error_with_file_and_line PROTO((char *, int, char *, ...));
|
||||
extern void grant_use_seizefile PROTO((char *));
|
||||
extern void pedwarn PROTO((char *, ...));
|
||||
extern void pfatal_with_name PROTO((char *));
|
||||
extern void push_obstacks PROTO((struct obstack *, struct obstack *));
|
||||
extern void set_identifier_size PROTO((int));
|
||||
extern void sorry PROTO((char *, ...));
|
||||
extern int target_isinf PROTO((REAL_VALUE_TYPE));
|
||||
extern int tolower PROTO((int));
|
||||
extern void warning PROTO((char *, ...));
|
||||
|
||||
/* forward declarations */
|
||||
static void close_input_file PROTO((char *));
|
||||
static tree convert_bitstring PROTO((char *));
|
||||
|
@ -90,7 +70,6 @@ static int maybe_number PROTO((char *));
|
|||
static tree equal_number PROTO((void));
|
||||
static void handle_use_seizefile_directive PROTO((int));
|
||||
static int handle_name PROTO((tree));
|
||||
static void push_back PROTO((int));
|
||||
static char *readstring PROTO((int, int *));
|
||||
static void read_directive PROTO((void));
|
||||
static tree read_identifier PROTO((int));
|
||||
|
@ -508,7 +487,7 @@ yylex ()
|
|||
break;
|
||||
if (ch == '_')
|
||||
continue;
|
||||
if (!isxdigit (ch)) /* error on non-hex digit */
|
||||
if (!ISXDIGIT (ch)) /* error on non-hex digit */
|
||||
{
|
||||
if (pass == 1)
|
||||
error ("invalid C'xx' ");
|
||||
|
@ -544,7 +523,7 @@ yylex ()
|
|||
for (;;)
|
||||
{
|
||||
ch = input ();
|
||||
if (isalnum (ch))
|
||||
if (ISALNUM (ch))
|
||||
obstack_1grow (&temporary_obstack, ch);
|
||||
else if (ch != '_')
|
||||
break;
|
||||
|
@ -594,7 +573,7 @@ yylex ()
|
|||
case '.':
|
||||
nextc = input ();
|
||||
unput (nextc);
|
||||
if (isdigit (nextc)) /* || nextc == '_') we don't start numbers with '_' */
|
||||
if (ISDIGIT (nextc)) /* || nextc == '_') we don't start numbers with '_' */
|
||||
goto number;
|
||||
return DOT;
|
||||
case '0': case '1': case '2': case '3': case '4':
|
||||
|
@ -637,7 +616,7 @@ read_identifier (first)
|
|||
first = input ();
|
||||
if (first == EOF)
|
||||
break;
|
||||
if (! isalnum (first) && first != '_')
|
||||
if (! ISALNUM (first) && first != '_')
|
||||
{
|
||||
unput (first);
|
||||
break;
|
||||
|
@ -661,7 +640,7 @@ handle_name (id)
|
|||
struct resword *tp;
|
||||
tp = in_word_set (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
|
||||
if (tp != NULL
|
||||
&& special_UC == isupper (tp->name[0])
|
||||
&& special_UC == ISUPPER ((unsigned char) tp->name[0])
|
||||
&& (tp->flags == RESERVED || tp->flags == PREDEF))
|
||||
{
|
||||
if (tp->rid != NORID)
|
||||
|
@ -686,7 +665,7 @@ read_number (ch)
|
|||
if (ch != '_')
|
||||
obstack_1grow (&temporary_obstack, ch);
|
||||
ch = input ();
|
||||
if (! isdigit (ch) && ch != '_')
|
||||
if (! ISDIGIT (ch) && ch != '_')
|
||||
break;
|
||||
}
|
||||
if (ch == '.')
|
||||
|
@ -696,7 +675,7 @@ read_number (ch)
|
|||
if (ch != '_')
|
||||
obstack_1grow (&temporary_obstack, ch);
|
||||
ch = input ();
|
||||
} while (isdigit (ch) || ch == '_');
|
||||
} while (ISDIGIT (ch) || ch == '_');
|
||||
is_float++;
|
||||
}
|
||||
if (ch == 'd' || ch == 'D' || ch == 'e' || ch == 'E')
|
||||
|
@ -709,14 +688,14 @@ read_number (ch)
|
|||
obstack_1grow (&temporary_obstack, ch);
|
||||
ch = input ();
|
||||
}
|
||||
if (isdigit (ch) || ch == '_')
|
||||
if (ISDIGIT (ch) || ch == '_')
|
||||
{
|
||||
do
|
||||
{
|
||||
if (ch != '_')
|
||||
obstack_1grow (&temporary_obstack, ch);
|
||||
ch = input ();
|
||||
} while (isdigit (ch) || ch == '_');
|
||||
} while (ISDIGIT (ch) || ch == '_');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -779,7 +758,7 @@ read_directive ()
|
|||
struct resword *tp;
|
||||
tree id;
|
||||
int ch = skip_whitespace();
|
||||
if (isalpha (ch) || ch == '_')
|
||||
if (ISALPHA (ch) || ch == '_')
|
||||
id = read_identifier (ch);
|
||||
else if (ch == EOF)
|
||||
{
|
||||
|
@ -794,7 +773,7 @@ read_directive ()
|
|||
return;
|
||||
}
|
||||
tp = in_word_set (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
|
||||
if (tp == NULL || special_UC != isupper (tp->name[0]))
|
||||
if (tp == NULL || special_UC != ISUPPER ((unsigned char) tp->name[0]))
|
||||
{
|
||||
if (pass == 1)
|
||||
warning ("unrecognized compiler directive `%s'",
|
||||
|
@ -897,7 +876,7 @@ maybe_downcase (str)
|
|||
return;
|
||||
while (*str)
|
||||
{
|
||||
if (isupper (*str))
|
||||
if (ISUPPER ((unsigned char) *str))
|
||||
*str = tolower (*str);
|
||||
str++;
|
||||
}
|
||||
|
@ -938,7 +917,7 @@ maybe_number (s)
|
|||
break;
|
||||
case 'h':
|
||||
case 'H':
|
||||
if (!isxdigit (*s))
|
||||
if (!ISXDIGIT ((unsigned char) *s))
|
||||
return 0;
|
||||
break;
|
||||
case 'b':
|
||||
|
@ -958,15 +937,6 @@ maybe_number (s)
|
|||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void
|
||||
push_back (c)
|
||||
char c;
|
||||
{
|
||||
if (c == '\n')
|
||||
lineno--;
|
||||
unput (c);
|
||||
}
|
||||
|
||||
static char *
|
||||
readstring (terminator, len)
|
||||
|
@ -976,7 +946,7 @@ readstring (terminator, len)
|
|||
int c;
|
||||
unsigned allocated = 1024;
|
||||
char *tmp = xmalloc (allocated);
|
||||
int i = 0;
|
||||
unsigned i = 0;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
|
@ -1110,14 +1080,14 @@ readstring (terminator, len)
|
|||
}
|
||||
else if (base == 10)
|
||||
{
|
||||
if (! isdigit (cc))
|
||||
if (! ISDIGIT (cc))
|
||||
cc = -1;
|
||||
else
|
||||
cc -= '0';
|
||||
}
|
||||
else if (base == 16)
|
||||
{
|
||||
if (!isxdigit (cc))
|
||||
if (!ISXDIGIT (cc))
|
||||
cc = -1;
|
||||
else
|
||||
{
|
||||
|
@ -1212,7 +1182,7 @@ convert_integer (intchars)
|
|||
base = 2;
|
||||
break;
|
||||
default:
|
||||
if (!isdigit (*p)) /* this test is for equal_number () */
|
||||
if (!ISDIGIT (*p)) /* this test is for equal_number () */
|
||||
{
|
||||
obstack_free (&temporary_obstack, intchars);
|
||||
return 0;
|
||||
|
@ -1380,7 +1350,6 @@ same_file (filename1, filename2)
|
|||
struct stat s[2];
|
||||
char *fn_input[2];
|
||||
int i, stat_status;
|
||||
extern char *strchr();
|
||||
|
||||
if (grant_only_flag)
|
||||
/* do nothing in this case */
|
||||
|
@ -1490,7 +1459,7 @@ getlc (file)
|
|||
register int c;
|
||||
|
||||
c = getc (file);
|
||||
if (isupper (c) && ignore_case)
|
||||
if (ISUPPER (c) && ignore_case)
|
||||
c = tolower (c);
|
||||
return c;
|
||||
}
|
||||
|
@ -1554,7 +1523,7 @@ check_newline ()
|
|||
it and ignore it; otherwise, ignore the line, with an error
|
||||
if the word isn't `pragma', `ident', `define', or `undef'. */
|
||||
|
||||
if (isupper (c) && ignore_case)
|
||||
if (ISUPPER (c) && ignore_case)
|
||||
c = tolower (c);
|
||||
|
||||
if (c >= 'a' && c <= 'z')
|
||||
|
@ -1566,14 +1535,14 @@ check_newline ()
|
|||
&& getlc (finput) == 'g'
|
||||
&& getlc (finput) == 'm'
|
||||
&& getlc (finput) == 'a'
|
||||
&& (isspace (c = getlc (finput))))
|
||||
&& (c = getlc (finput), ISSPACE (c)))
|
||||
{
|
||||
#ifdef HANDLE_PRAGMA
|
||||
static char buffer [128];
|
||||
char * buff = buffer;
|
||||
|
||||
/* Read the pragma name into a buffer. */
|
||||
while (isspace (c = getlc (finput)))
|
||||
while (c = getlc (finput), ISSPACE (c))
|
||||
continue;
|
||||
|
||||
do
|
||||
|
@ -1581,7 +1550,7 @@ check_newline ()
|
|||
* buff ++ = c;
|
||||
c = getlc (finput);
|
||||
}
|
||||
while (c != EOF && ! isspace (c) && c != '\n'
|
||||
while (c != EOF && ! ISSPACE (c) && c != '\n'
|
||||
&& buff < buffer + 128);
|
||||
|
||||
pragma_ungetc (c);
|
||||
|
@ -1601,7 +1570,7 @@ check_newline ()
|
|||
&& getlc (finput) == 'i'
|
||||
&& getlc (finput) == 'n'
|
||||
&& getlc (finput) == 'e'
|
||||
&& (isspace (c = getlc (finput))))
|
||||
&& (c = getlc (finput), ISSPACE (c)))
|
||||
{
|
||||
#if 0 /*def DWARF_DEBUGGING_INFO*/
|
||||
if (c != '\n'
|
||||
|
@ -1618,7 +1587,7 @@ check_newline ()
|
|||
&& getlc (finput) == 'd'
|
||||
&& getlc (finput) == 'e'
|
||||
&& getlc (finput) == 'f'
|
||||
&& (isspace (c = getlc (finput))))
|
||||
&& (c = getlc (finput), ISSPACE (c)))
|
||||
{
|
||||
#if 0 /*def DWARF_DEBUGGING_INFO*/
|
||||
if (c != '\n'
|
||||
|
@ -1699,7 +1668,7 @@ linenum:
|
|||
|
||||
/* Something follows the #; read a token. */
|
||||
|
||||
if (isdigit(c))
|
||||
if (ISDIGIT(c))
|
||||
{
|
||||
int old_lineno = lineno;
|
||||
int used_up = 0;
|
||||
|
@ -1710,7 +1679,7 @@ linenum:
|
|||
{
|
||||
l = l * 10 + (c - '0'); /* FIXME Not portable */
|
||||
c = getlc(finput);
|
||||
} while (isdigit(c));
|
||||
} while (ISDIGIT(c));
|
||||
/* subtract one, because it is the following line that
|
||||
gets the specified number */
|
||||
|
||||
|
@ -1777,7 +1746,7 @@ linenum:
|
|||
/* `1' after file name means entering new file.
|
||||
`2' after file name means just left a file. */
|
||||
|
||||
if (isdigit (c))
|
||||
if (ISDIGIT (c))
|
||||
{
|
||||
if (c == '1')
|
||||
{
|
||||
|
@ -1976,7 +1945,7 @@ equal_number ()
|
|||
/* collect token into tokenbuf for later analysis */
|
||||
while (TRUE)
|
||||
{
|
||||
if (isspace (c) || c == '<')
|
||||
if (ISSPACE (c) || c == '<')
|
||||
break;
|
||||
obstack_1grow (&temporary_obstack, c);
|
||||
c = input ();
|
||||
|
@ -2017,7 +1986,7 @@ equal_number ()
|
|||
{
|
||||
cursor = tokenbuf;
|
||||
c = *cursor;
|
||||
if (!isalpha (c) && c != '_')
|
||||
if (!ISALPHA (c) && c != '_')
|
||||
{
|
||||
if (pass == 1)
|
||||
error ("invalid value follows `=' in compiler directive");
|
||||
|
@ -2025,7 +1994,8 @@ equal_number ()
|
|||
}
|
||||
|
||||
for (cursor = &tokenbuf[1]; *cursor != '\0'; cursor++)
|
||||
if (isalpha (*cursor) || *cursor == '_' || isdigit (*cursor))
|
||||
if (ISALPHA ((unsigned char) *cursor) || *cursor == '_' ||
|
||||
ISDIGIT (*cursor))
|
||||
continue;
|
||||
else
|
||||
{
|
||||
|
@ -2117,9 +2087,7 @@ mark_use_seizefile_written (name)
|
|||
static int
|
||||
yywrap ()
|
||||
{
|
||||
extern char *strchr ();
|
||||
extern char *chill_real_input_filename;
|
||||
tree node;
|
||||
|
||||
close_input_file (input_filename);
|
||||
|
||||
|
|
|
@ -17,9 +17,8 @@ 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. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "tree.h"
|
||||
#include "ch-tree.h"
|
||||
#include "lex.h"
|
||||
|
@ -29,19 +28,12 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||
#include "obstack.h"
|
||||
#include "assert.h"
|
||||
#include "rtl.h"
|
||||
#include "toplev.h"
|
||||
|
||||
/* if the user codes '-flocal-loop-counter' on the command line,
|
||||
ch-actions.c (lang_decode_option) will set this flag. */
|
||||
int flag_local_loop_counter = 1;
|
||||
|
||||
extern rtx emit_line_note PROTO((char *, int));
|
||||
extern void error PROTO((char *, ...));
|
||||
extern rtx expand_assignment PROTO((tree, tree, int, int));
|
||||
extern void save_expr_under_name PROTO((tree, tree));
|
||||
extern void stamp_nesting_label PROTO((tree));
|
||||
extern int int_fits_type_p PROTO((tree, tree));
|
||||
extern void warning PROTO((char *, ...));
|
||||
|
||||
/* forward declarations */
|
||||
static int declare_temps PROTO((void));
|
||||
static int initialize_iter_var PROTO((void));
|
||||
|
@ -50,7 +42,9 @@ 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));
|
||||
#if 0
|
||||
static tree chill_unsigned_type PROTO((tree));
|
||||
#endif
|
||||
|
||||
/* In terms of the parameters passed to build_loop_iterator,
|
||||
* there are several types of loops. They are encoded by
|
||||
|
@ -377,8 +371,6 @@ pop_loop_block ()
|
|||
void
|
||||
begin_loop_scope ()
|
||||
{
|
||||
ITERATOR *firstp = loopstack->iter_list;
|
||||
|
||||
pushlevel (1);
|
||||
|
||||
if (pass >= 2)
|
||||
|
@ -417,8 +409,6 @@ end_loop_scope (opt_label)
|
|||
void
|
||||
nonvalue_begin_loop_scope ()
|
||||
{
|
||||
ITERATOR *firstp = loopstack->iter_list;
|
||||
|
||||
pushlevel (0); /* this happens only in pass 2 */
|
||||
|
||||
declare_temps ();
|
||||
|
@ -1221,7 +1211,7 @@ maybe_make_for_temp (exp, temp_name, exp_type)
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* Adapt the C unsigned_type function to CHILL - we need to
|
||||
* account for any CHILL-specific integer types here. So far,
|
||||
|
@ -1239,3 +1229,4 @@ chill_unsigned_type (type)
|
|||
else
|
||||
return unsigned_type (type);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -40,14 +40,15 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||
* Then code is generated.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "tree.h"
|
||||
#include "ch-tree.h"
|
||||
#include "lex.h"
|
||||
#include "actions.h"
|
||||
#include "tasking.h"
|
||||
#include "parse.h"
|
||||
#include "toplev.h"
|
||||
|
||||
/* Since parsers are distinct for each language, put the
|
||||
language string definition here. (fnf) */
|
||||
|
@ -68,26 +69,11 @@ char *language_string = "GNU CHILL";
|
|||
/* Cause the `yydebug' variable to be defined. */
|
||||
#define YYDEBUG 1
|
||||
|
||||
extern void assemble_external PROTO((tree));
|
||||
extern void chill_check_no_handlers PROTO((void));
|
||||
extern void chill_finish_on PROTO((void));
|
||||
extern void chill_handle_case_default PROTO((void));
|
||||
extern void chill_handle_on_labels PROTO((tree));
|
||||
extern tree chill_initializer_constant_valid_p PROTO((tree, tree));
|
||||
extern void chill_start_default_handler PROTO((void));
|
||||
extern void chill_start_on PROTO((void));
|
||||
extern struct rtx_def* emit_line_note PROTO((char *, int));
|
||||
extern struct rtx_def* gen_label_rtx PROTO((void));
|
||||
extern void emit_jump PROTO((struct rtx_def *));
|
||||
extern void emit_label PROTO((struct rtx_def *));
|
||||
extern void error PROTO((char *, ...));
|
||||
extern int expand_exit_labelled PROTO((tree));
|
||||
extern void lookup_and_expand_goto PROTO((tree));
|
||||
extern void lookup_and_handle_exit PROTO((tree));
|
||||
|
||||
extern void push_granted PROTO((tree, tree));
|
||||
extern void sorry PROTO((char *, ...));
|
||||
extern void warning PROTO((char *, ...));
|
||||
static int parse_action PROTO((void));
|
||||
|
||||
extern int lineno;
|
||||
extern char *input_filename;
|
||||
|
@ -96,7 +82,9 @@ extern tree signal_code;
|
|||
extern int all_static_flag;
|
||||
extern int ignore_case;
|
||||
|
||||
#if 0
|
||||
static int quasi_signal = 0; /* 1 if processing a quasi signal decl */
|
||||
#endif
|
||||
|
||||
int parsing_newmode; /* 0 while parsing SYNMODE;
|
||||
1 while parsing NEWMODE. */
|
||||
|
@ -261,7 +249,7 @@ static YYSTYPE val_buffer[MAX_LOOK_AHEAD+1];
|
|||
#ifdef __GNUC__
|
||||
__inline__
|
||||
#endif
|
||||
static int
|
||||
static enum terminal
|
||||
PEEK_TOKEN()
|
||||
{
|
||||
if (terminal_buffer[0] == TOKEN_NOT_READ)
|
||||
|
@ -533,8 +521,6 @@ parse_opt_end_label_semi_colon (start_label)
|
|||
parse_semi_colon ();
|
||||
}
|
||||
|
||||
extern tree set_module_name ();
|
||||
|
||||
static void
|
||||
parse_modulion (label)
|
||||
tree label;
|
||||
|
@ -633,7 +619,6 @@ void
|
|||
parse_mode_definition_statement (is_newmode)
|
||||
int is_newmode;
|
||||
{
|
||||
tree names;
|
||||
FORWARD_TOKEN (); /* skip SYNMODE or NEWMODE */
|
||||
parse_mode_definition (is_newmode);
|
||||
while (PEEK_TOKEN () == COMMA)
|
||||
|
@ -1077,8 +1062,7 @@ parse_param_attr ()
|
|||
/* In pass 1, returns list of types; in pass 2: chain of PARM_DECLs. */
|
||||
|
||||
static tree
|
||||
parse_formpar (in_spec_module)
|
||||
int in_spec_module;
|
||||
parse_formpar ()
|
||||
{
|
||||
tree names = parse_param_name_list ();
|
||||
tree mode = parse_mode ();
|
||||
|
@ -1093,15 +1077,14 @@ parse_formpar (in_spec_module)
|
|||
* also need change. Push_extern_process is affected as well.
|
||||
*/
|
||||
static tree
|
||||
parse_formparlist (in_spec_module)
|
||||
int in_spec_module;
|
||||
parse_formparlist ()
|
||||
{
|
||||
tree list = NULL_TREE;
|
||||
if (PEEK_TOKEN() == RPRN)
|
||||
return NULL_TREE;
|
||||
for (;;)
|
||||
{
|
||||
list = chainon (list, parse_formpar (in_spec_module));
|
||||
list = chainon (list, parse_formpar ());
|
||||
if (! check_token (COMMA))
|
||||
break;
|
||||
}
|
||||
|
@ -1233,7 +1216,7 @@ parse_procedure_definition (in_spec_module)
|
|||
ignoring = pass == 2;
|
||||
require (COLON); require (PROC);
|
||||
expect (LPRN, "missing '(' after PROC");
|
||||
params = parse_formparlist (in_spec_module);
|
||||
params = parse_formparlist ();
|
||||
expect (RPRN, "missing ')' in PROC");
|
||||
result = parse_opt_result_spec ();
|
||||
exceptlist = parse_opt_except ();
|
||||
|
@ -1259,7 +1242,7 @@ parse_processpar ()
|
|||
tree names = parse_defining_occurrence_list ();
|
||||
tree mode = parse_mode ();
|
||||
tree paramattr = parse_param_attr ();
|
||||
tree parms = NULL_TREE;
|
||||
|
||||
if (names && TREE_CODE (names) == IDENTIFIER_NODE)
|
||||
names = build_tree_list (NULL_TREE, names);
|
||||
return tree_cons (tree_cons (paramattr, mode, NULL_TREE), names, NULL_TREE);
|
||||
|
@ -1395,16 +1378,18 @@ parse_definition (in_spec_module)
|
|||
{
|
||||
case NAME:
|
||||
if (PEEK_TOKEN1() == COLON)
|
||||
if (PEEK_TOKEN2() == PROC)
|
||||
{
|
||||
parse_procedure_definition (in_spec_module);
|
||||
return 1;
|
||||
}
|
||||
else if (PEEK_TOKEN2() == PROCESS)
|
||||
{
|
||||
parse_process_definition (in_spec_module);
|
||||
return 1;
|
||||
}
|
||||
{
|
||||
if (PEEK_TOKEN2() == PROC)
|
||||
{
|
||||
parse_procedure_definition (in_spec_module);
|
||||
return 1;
|
||||
}
|
||||
else if (PEEK_TOKEN2() == PROCESS)
|
||||
{
|
||||
parse_process_definition (in_spec_module);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
case DCL:
|
||||
parse_declaration_statement(in_spec_module);
|
||||
|
@ -1684,10 +1669,9 @@ static void
|
|||
parse_multi_dimension_case_action (selector)
|
||||
tree selector;
|
||||
{
|
||||
struct rtx_def *begin_test_label, *end_case_label, *new_label;
|
||||
struct rtx_def *begin_test_label = 0, *end_case_label, *new_label;
|
||||
tree action_labels = NULL_TREE;
|
||||
tree tests = NULL_TREE;
|
||||
tree new_test;
|
||||
int save_lineno = lineno;
|
||||
char *save_filename = input_filename;
|
||||
|
||||
|
@ -1816,10 +1800,6 @@ parse_case_action (label)
|
|||
tree selector;
|
||||
int multi_dimension_case = 0;
|
||||
|
||||
/* The case label/action toggle. It is 0 initially, and when an action
|
||||
was last seen. It is 1 integer_zero_node when a label was last seen. */
|
||||
int caseaction_flag = 0;
|
||||
|
||||
require (CASE);
|
||||
selector = parse_expr_list ();
|
||||
selector = nreverse (selector);
|
||||
|
@ -1897,7 +1877,7 @@ parse_asm_clobbers ()
|
|||
tree list = NULL_TREE;
|
||||
for (;;)
|
||||
{
|
||||
tree string, expr;
|
||||
tree string;
|
||||
if (PEEK_TOKEN () != STRING)
|
||||
{
|
||||
error ("bad ASM operand");
|
||||
|
@ -2176,7 +2156,7 @@ static void
|
|||
parse_delay_case_action (label)
|
||||
tree label;
|
||||
{
|
||||
tree label_cnt, set_location, priority;
|
||||
tree label_cnt = NULL_TREE, set_location, priority;
|
||||
tree combined_event_list = NULL_TREE;
|
||||
require (DELAY);
|
||||
require (CASE);
|
||||
|
@ -2577,7 +2557,7 @@ parse_opt_actions ()
|
|||
while (parse_action ()) ;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
parse_action ()
|
||||
{
|
||||
tree label = NULL_TREE;
|
||||
|
@ -2962,7 +2942,7 @@ parse_tuple_element ()
|
|||
{
|
||||
/* The tupleelement chain is built in reverse order,
|
||||
and put in forward order when the list is used. */
|
||||
tree value, list, label;
|
||||
tree value, label;
|
||||
if (PEEK_TOKEN () == DOT)
|
||||
{
|
||||
/* Parse a labelled structure tuple. */
|
||||
|
@ -3152,6 +3132,8 @@ parse_primval ()
|
|||
args = parse_primval ();
|
||||
val = ignoring ? val : build_generalized_call (val, args);
|
||||
continue;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -3755,8 +3737,8 @@ parse_variant_field_list ()
|
|||
static tree
|
||||
parse_variant_alternative ()
|
||||
{
|
||||
tree labels, x;
|
||||
tree variant_fields = NULL_TREE;
|
||||
tree labels;
|
||||
|
||||
if (PEEK_TOKEN () == LPRN)
|
||||
labels = parse_case_label_specification (NULL_TREE);
|
||||
else
|
||||
|
|
|
@ -17,20 +17,16 @@ 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. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "tree.h"
|
||||
#include "flags.h"
|
||||
#include "ch-tree.h"
|
||||
#include "lex.h"
|
||||
#include "toplev.h"
|
||||
|
||||
#define SATISFY(ARG) ((ARG) = satisfy(ARG, chain))
|
||||
|
||||
extern void error PROTO((char *, ...));
|
||||
extern void error_with_decl PROTO((tree, char *, ...));
|
||||
extern void expand_decl PROTO((tree));
|
||||
extern void layout_enum PROTO((tree));
|
||||
|
||||
struct decl_chain
|
||||
{
|
||||
struct decl_chain *prev;
|
||||
|
|
|
@ -17,10 +17,8 @@ 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. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "tree.h"
|
||||
#include "rtl.h"
|
||||
#include "ch-tree.h"
|
||||
|
@ -30,13 +28,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||
#include "assert.h"
|
||||
#include "tasking.h"
|
||||
#include "lex.h"
|
||||
|
||||
/* external functions */
|
||||
extern void emit_jump PROTO((rtx));
|
||||
extern void error PROTO((char *, ...));
|
||||
extern void error_with_decl PVPROTO ((tree, char *, ...));
|
||||
extern void push_obstacks PROTO((struct obstack *, struct obstack *));
|
||||
extern void warning PROTO((char *, ...));
|
||||
#include "toplev.h"
|
||||
|
||||
/* from ch-lex.l, from compiler directives */
|
||||
extern tree process_type;
|
||||
|
@ -70,8 +62,10 @@ static char * struct_name = "__tmp_%s_arg_type";
|
|||
/* name template for process arguments for debugging type */
|
||||
static char * struct_debug_name = "__tmp_%s_debug_type";
|
||||
|
||||
#if 0
|
||||
/* name template for process argument variable */
|
||||
static char * data_name = "__tmp_%s_arg_variable";
|
||||
#endif
|
||||
|
||||
/* name template for process wrapper */
|
||||
static char * wrapper_name = "__tmp_%s_wrapper";
|
||||
|
@ -117,7 +111,7 @@ get_tasking_code_name (name)
|
|||
return get_identifier (tmpname);
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
static tree
|
||||
get_struct_variable_name (name)
|
||||
tree name;
|
||||
|
@ -128,6 +122,7 @@ get_struct_variable_name (name)
|
|||
sprintf (tmpname, data_name, idp);
|
||||
return get_identifier (tmpname);
|
||||
}
|
||||
#endif
|
||||
|
||||
static tree
|
||||
get_process_wrapper_name (name)
|
||||
|
@ -498,7 +493,7 @@ build_process_wrapper (plabel, processdata)
|
|||
|
||||
void
|
||||
validate_process_parameters (parms)
|
||||
tree parms;
|
||||
tree parms ATTRIBUTE_UNUSED;
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -522,7 +517,7 @@ build_start_process (process_name, copynum,
|
|||
tree process_decl, struct_type_node;
|
||||
tree result;
|
||||
tree valtail, typetail;
|
||||
tree tuple, actuallist = NULL_TREE;
|
||||
tree tuple = NULL_TREE, actuallist = NULL_TREE;
|
||||
tree typelist;
|
||||
int parmno = 2;
|
||||
tree args;
|
||||
|
@ -2111,7 +2106,6 @@ build_receive_buffer_case_end (label_cnt, buf_list, else_clause)
|
|||
tree buffer_descr;
|
||||
tree buffer_descr_init;
|
||||
tree buffer_length;
|
||||
tree buffer_ptr;
|
||||
tree field;
|
||||
char fldname[20];
|
||||
|
||||
|
|
|
@ -17,10 +17,8 @@ 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. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "tree.h"
|
||||
#include "rtl.h"
|
||||
#include "ch-tree.h"
|
||||
|
@ -28,6 +26,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||
#include "input.h"
|
||||
#include "obstack.h"
|
||||
#include "lex.h"
|
||||
#include "toplev.h"
|
||||
|
||||
#ifndef LONG_TYPE_SIZE
|
||||
#define LONG_TYPE_SIZE BITS_PER_WORD
|
||||
|
@ -394,7 +393,7 @@ build_after_start (duration, delay_flag)
|
|||
void
|
||||
build_after_timeout_start ()
|
||||
{
|
||||
tree label_name, goto_where;
|
||||
tree label_name;
|
||||
|
||||
if (! ignoring)
|
||||
{
|
||||
|
|
|
@ -18,17 +18,16 @@ along with GNU CC; see the file COPYING. If not, write to
|
|||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "obstack.h"
|
||||
#include "tree.h"
|
||||
#include "ch-tree.h"
|
||||
#include "toplev.h"
|
||||
|
||||
/* Here is how primitive or already-canonicalized types'
|
||||
hash codes are made. */
|
||||
#define TYPE_HASH(TYPE) ((HOST_WIDE_INT) (TYPE) & 0777777)
|
||||
|
||||
extern void error PROTO((char *, ...));
|
||||
extern int get_type_precision PROTO((tree, tree));
|
||||
|
||||
extern struct obstack permanent_obstack;
|
||||
/* This is special sentinel used to communicate from build_string_type
|
||||
to layout_chill_range_type for the index range of a string. */
|
||||
|
|
|
@ -28,27 +28,14 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||
like a strange sort of assignment). */
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include "system.h"
|
||||
#include "tree.h"
|
||||
#include "ch-tree.h"
|
||||
#include "flags.h"
|
||||
#include "rtl.h"
|
||||
#include "expr.h"
|
||||
#include "lex.h"
|
||||
|
||||
extern tree build_chill_compound_expr PROTO((tree));
|
||||
extern tree build_component_ref PROTO((tree, tree));
|
||||
extern void c_expand_return PROTO((tree));
|
||||
extern int ch_singleton_set PROTO((tree));
|
||||
extern void error PROTO((char *, ...));
|
||||
extern void error_with_decl PROTO((tree, char *, ...));
|
||||
extern int mark_addressable PROTO((tree));
|
||||
extern void pedwarn PROTO((char *, ...));
|
||||
extern void pedwarn_with_decl PROTO((tree, char *, ...));
|
||||
extern tree require_complete_type PROTO((tree));
|
||||
extern void sorry PROTO((char *, ...));
|
||||
extern void warning PROTO((char *, ...));
|
||||
extern int get_type_precision PROTO((tree, tree));
|
||||
#include "toplev.h"
|
||||
|
||||
extern tree intQI_type_node;
|
||||
extern tree intHI_type_node;
|
||||
|
@ -63,9 +50,9 @@ extern tree unsigned_intDI_type_node;
|
|||
extern tree unsigned_intTI_type_node;
|
||||
|
||||
/* forward declarations */
|
||||
tree chill_expand_tuple PROTO((tree, tree));
|
||||
static int chill_l_equivalent PROTO((tree, tree, struct mode_chain*));
|
||||
extern tree extract_constant_from_buffer();
|
||||
static tree extract_constant_from_buffer PROTO((tree, unsigned char *, int));
|
||||
static int expand_constant_to_buffer PROTO((tree, unsigned char *, int));
|
||||
|
||||
/*
|
||||
* This function checks an array access.
|
||||
|
@ -249,7 +236,6 @@ build_chill_slice (array, min_value, length)
|
|||
tree element_type = TREE_TYPE (array_type);
|
||||
tree slice_type = build_simple_array_type (element_type, index_type, NULL_TREE);
|
||||
tree slice_pointer_type;
|
||||
int is_static;
|
||||
tree max_size;
|
||||
|
||||
if (CH_CHARS_TYPE_P (array_type))
|
||||
|
@ -729,7 +715,7 @@ convert_to_discrete (exp)
|
|||
Returns 1 on success, or 0 on failure. (Either the VALUE was
|
||||
not constant, or we don't know how to do the conversion.) */
|
||||
|
||||
int
|
||||
static int
|
||||
expand_constant_to_buffer (value, buffer, buf_size)
|
||||
tree value;
|
||||
unsigned char *buffer;
|
||||
|
@ -782,10 +768,12 @@ expand_constant_to_buffer (value, buffer, buf_size)
|
|||
{
|
||||
tree min_val = TYPE_MIN_VALUE (TYPE_DOMAIN (type));
|
||||
if (min_val)
|
||||
if (TREE_CODE (min_val) != INTEGER_CST)
|
||||
return 0;
|
||||
else
|
||||
min_index = TREE_INT_CST_LOW (min_val);
|
||||
{
|
||||
if (TREE_CODE (min_val) != INTEGER_CST)
|
||||
return 0;
|
||||
else
|
||||
min_index = TREE_INT_CST_LOW (min_val);
|
||||
}
|
||||
}
|
||||
|
||||
next_index = min_index;
|
||||
|
@ -858,7 +846,7 @@ expand_constant_to_buffer (value, buffer, buf_size)
|
|||
Returns NULL_TREE on failure. (E.g. the TYPE might be variable size,
|
||||
or perhaps we don't know how to do the conversion.) */
|
||||
|
||||
tree
|
||||
static tree
|
||||
extract_constant_from_buffer (type, buffer, buf_size)
|
||||
tree type;
|
||||
unsigned char *buffer;
|
||||
|
@ -912,10 +900,12 @@ extract_constant_from_buffer (type, buffer, buf_size)
|
|||
return 0;
|
||||
value = TYPE_MIN_VALUE (TYPE_DOMAIN (type));
|
||||
if (value)
|
||||
if (TREE_CODE (value) != INTEGER_CST)
|
||||
return 0;
|
||||
else
|
||||
min_index = TREE_INT_CST_LOW (value);
|
||||
{
|
||||
if (TREE_CODE (value) != INTEGER_CST)
|
||||
return 0;
|
||||
else
|
||||
min_index = TREE_INT_CST_LOW (value);
|
||||
}
|
||||
value = TYPE_MAX_VALUE (TYPE_DOMAIN (type));
|
||||
if (value == NULL_TREE || TREE_CODE (value) != INTEGER_CST)
|
||||
return 0;
|
||||
|
@ -1845,12 +1835,14 @@ chill_compatible (expr, mode)
|
|||
mode = TREE_TYPE (mode);
|
||||
|
||||
if (TREE_TYPE (expr) == NULL_TREE)
|
||||
if (TREE_CODE (expr) == CONSTRUCTOR)
|
||||
return TREE_CODE (mode) == RECORD_TYPE
|
||||
|| ((TREE_CODE (mode) == SET_TYPE || TREE_CODE (mode) == ARRAY_TYPE)
|
||||
&& ! TYPE_STRING_FLAG (mode));
|
||||
else
|
||||
return TREE_CODE (expr) == CASE_EXPR || TREE_CODE (expr) == COND_EXPR;
|
||||
{
|
||||
if (TREE_CODE (expr) == CONSTRUCTOR)
|
||||
return TREE_CODE (mode) == RECORD_TYPE
|
||||
|| ((TREE_CODE (mode) == SET_TYPE || TREE_CODE (mode) == ARRAY_TYPE)
|
||||
&& ! TYPE_STRING_FLAG (mode));
|
||||
else
|
||||
return TREE_CODE (expr) == CASE_EXPR || TREE_CODE (expr) == COND_EXPR;
|
||||
}
|
||||
|
||||
class = chill_expr_class (expr);
|
||||
switch (class.kind)
|
||||
|
@ -2733,7 +2725,7 @@ apply_chill_array_layout (array_type)
|
|||
tree array_type;
|
||||
{
|
||||
tree layout, temp, what, element_type;
|
||||
int stepsize, word, start_bit, offset, length, natural_length;
|
||||
int stepsize, word, start_bit, length, natural_length;
|
||||
int stepsize_specified;
|
||||
int start_bit_error = 0;
|
||||
int length_error = 0;
|
||||
|
@ -3351,7 +3343,6 @@ smash_dummy_type (type)
|
|||
int save_readonly = TYPE_READONLY (type);
|
||||
tree save_novelty = CH_NOVELTY (type);
|
||||
tree save_domain = TYPE_DOMAIN (type);
|
||||
struct lang_type *save_lang_specific = TYPE_LANG_SPECIFIC (type);
|
||||
|
||||
if (origin == NULL_TREE)
|
||||
abort ();
|
||||
|
@ -3795,9 +3786,9 @@ initializer_constant_valid_p (value, endtype)
|
|||
return null_pointer_node;
|
||||
return 0;
|
||||
}
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Return an integer type with BITS bits of precision,
|
||||
|
|
Loading…
Reference in New Issue