+Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * parse.y: Break out eat_saved_input, handle errors.
+
+Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
+
+Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
+ existence of cc1plus check whether $(LANGUAGES) contains C++.
+
+Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * method.c (do_build_copy_constructor): When copying an anonymous
+ union member loop around to handle nested anonymous unions. Use
+ the offset of the member relative to the outer structure, not the
+ union.
+
Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
* call.c (resolve_args): New fn.
# We want to update cplib2.txt if any of the source files change...
cplib2.txt: $(CXX_LIB2SRCS) $(CXX_EXTRA_HEADERS) cplib2.ready
- if [ -f cc1plus ]; then \
- echo $(CXX_LIB2FUNCS) > cplib2.new; \
- else \
- echo "" > cplib2.new; \
- fi
+ case " $(LANGUAGES) " in \
+ *" "[cC]"++ "*) \
+ echo $(CXX_LIB2FUNCS) > cplib2.new;; \
+ *) \
+ echo "" > cplib2.new;; \
+ esac
mv -f cplib2.new cplib2.txt
# Or if it would be different.
cplib2.ready: $(GCC_PASSES) $(LANGUAGES) $(LIBGCC2_DEPS) stmp-int-hdrs
@if [ -r cplib2.txt ]; then \
- if [ -f cc1plus ]; then \
- echo $(CXX_LIB2FUNCS) > cplib2.new; \
- else \
- echo "" > cplib2.new; \
- fi; \
+ case " $(LANGUAGES) " in \
+ *" "[cC]"++ "*) \
+ echo $(CXX_LIB2FUNCS) > cplib2.new;; \
+ *) \
+ echo "" > cplib2.new;; \
+ esac; \
if cmp -s cplib2.new cplib2.txt; then true; else \
touch cplib2.ready; \
fi; \
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(BIG_SWITCHFLAG) \
`echo $(PARSE_C) | sed 's,^\./,,'`
-CONFLICTS = expect 18 shift/reduce conflicts and 39 reduce/reduce conflicts.
+CONFLICTS = expect 20 shift/reduce conflicts and 39 reduce/reduce conflicts.
$(PARSE_H) : $(PARSE_C)
$(PARSE_C) : $(srcdir)/parse.y
@echo $(CONFLICTS)
if (TREE_CODE (field) != FIELD_DECL)
continue;
+
+ init = parm;
if (DECL_NAME (field))
{
if (VFIELD_NAME_P (DECL_NAME (field)))
&& TREE_CODE (t) == UNION_TYPE
&& ANON_AGGRNAME_P (TYPE_IDENTIFIER (t))
&& TYPE_FIELDS (t) != NULL_TREE)
- field = largest_union_member (t);
+ {
+ do
+ {
+ init = build (COMPONENT_REF, t, init, field);
+ field = largest_union_member (t);
+ }
+ while ((t = TREE_TYPE (field)) != NULL_TREE
+ && TREE_CODE (t) == UNION_TYPE
+ && ANON_AGGRNAME_P (TYPE_IDENTIFIER (t))
+ && TYPE_FIELDS (t) != NULL_TREE);
+ }
else
continue;
- init = build (COMPONENT_REF, TREE_TYPE (field), parm, field);
+ init = build (COMPONENT_REF, TREE_TYPE (field), init, field);
init = build_tree_list (NULL_TREE, init);
current_member_init_list
continue;
}
+ comp = current_class_ref;
+ init = parm;
+
if (DECL_NAME (field))
{
if (VFIELD_NAME_P (DECL_NAME (field)))
&& TREE_CODE (t) == UNION_TYPE
&& ANON_AGGRNAME_P (TYPE_IDENTIFIER (t))
&& TYPE_FIELDS (t) != NULL_TREE)
- field = largest_union_member (t);
+ {
+ do
+ {
+ comp = build (COMPONENT_REF, t, comp, field);
+ init = build (COMPONENT_REF, t, init, field);
+ field = largest_union_member (t);
+ }
+ while ((t = TREE_TYPE (field)) != NULL_TREE
+ && TREE_CODE (t) == UNION_TYPE
+ && ANON_AGGRNAME_P (TYPE_IDENTIFIER (t))
+ && TYPE_FIELDS (t) != NULL_TREE);
+ }
else
continue;
- comp = build (COMPONENT_REF, TREE_TYPE (field), current_class_ref, field);
- init = build (COMPONENT_REF, TREE_TYPE (field), parm, field);
+ comp = build (COMPONENT_REF, TREE_TYPE (field), comp, field);
+ init = build (COMPONENT_REF, TREE_TYPE (field), init, field);
expand_expr_stmt (build_modify_expr (comp, NOP_EXPR, init));
}
;
extdef:
- fndef
+ fndef eat_saved_input
{ if (pending_inlines) do_pending_inlines (); }
| datadef
{ if (pending_inlines) do_pending_inlines (); }
assemble_asm ($3); }
| extern_lang_string '{' extdefs_opt '}'
{ pop_lang_context (); }
- | extern_lang_string .hush_warning fndef .warning_ok
+ | extern_lang_string .hush_warning fndef .warning_ok eat_saved_input
{ if (pending_inlines) do_pending_inlines ();
pop_lang_context (); }
| extern_lang_string .hush_warning datadef .warning_ok
fn.def1 maybe_return_init ctor_initializer_opt compstmt_or_error
{ finish_function (lineno, (int)$3, 0); }
| fn.def1 maybe_return_init function_try_block
- { if ($<ttype>$) process_next_inline ($<ttype>$); }
- eat_saved_input
+ { }
+ | fn.def1 maybe_return_init error
+ { }
;
constructor_declarator:
NULL_TREE, 1);
reinit_parse_for_function (); }
-pending_inlines:
- /* empty */
- | pending_inlines fn.defpen maybe_return_init ctor_initializer_opt
- compstmt_or_error
+pending_inline:
+ fn.defpen maybe_return_init ctor_initializer_opt compstmt_or_error
{
int nested = (hack_decl_function_context
(current_function_decl) != NULL_TREE);
- finish_function (lineno, (int)$4, nested);
- process_next_inline ($2);
+ finish_function (lineno, (int)$3, nested);
+ process_next_inline ($1);
}
- | pending_inlines fn.defpen maybe_return_init function_try_block
- { process_next_inline ($2); }
- eat_saved_input
+ | fn.defpen maybe_return_init function_try_block
+ { process_next_inline ($1); }
+ | fn.defpen maybe_return_init error
+ { process_next_inline ($1); }
+ ;
+
+pending_inlines:
+ /* empty */
+ | pending_inlines pending_inline eat_saved_input
;
/* A regurgitated default argument. The value of DEFARG_MARKER will be
defarg_again:
DEFARG_MARKER expr_no_commas END_OF_SAVED_INPUT
{ replace_defarg ($1, $2); }
+ | DEFARG_MARKER error END_OF_SAVED_INPUT
+ { replace_defarg ($1, error_mark_node); }
pending_defargs:
/* empty */ %prec EMPTY
rval = build (NEW_EXPR, type,
TREE_OPERAND (init, 0), TREE_OPERAND (init, 1), slot);
TREE_SIDE_EFFECTS (rval) = 1;
- TREE_ADDRESSABLE (rval) = 1;
rval = build (TARGET_EXPR, type, slot, rval, NULL_TREE, NULL_TREE);
TREE_SIDE_EFFECTS (rval) = 1;
- TREE_ADDRESSABLE (rval) = 1;
return rval;
}