aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMike Stump <mrs@gcc.gnu.org>1994-09-30 00:51:03 +0000
committerMike Stump <mrs@gcc.gnu.org>1994-09-30 00:51:03 +0000
commiteac293a1a815242d72d8f081886c24e9edbb1842 (patch)
tree563d598a2adceb35b8d17abcb77d88840bff053d /gcc
parent63f7136fd89b12e2a76b546474ae5ec88fb1f62a (diff)
downloadgcc-eac293a1a815242d72d8f081886c24e9edbb1842.zip
gcc-eac293a1a815242d72d8f081886c24e9edbb1842.tar.gz
gcc-eac293a1a815242d72d8f081886c24e9edbb1842.tar.bz2
48th Cygnus<->FSF merge
From-SVN: r8177
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog27
-rw-r--r--gcc/cp/decl.c7
-rw-r--r--gcc/cp/gxxint.texi6
-rw-r--r--gcc/cp/lex.c31
-rw-r--r--gcc/cp/method.c6
-rw-r--r--gcc/cp/typeck.c8
-rw-r--r--gcc/cp/typeck2.c6
7 files changed, 68 insertions, 23 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 216f54b..2596c95 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -12,6 +12,33 @@ Wed Sep 14 10:17:27 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
* g++.c: Include <sys/errno.h> in case `errno' is a macro
as permitted by ANSI C.
+Thu Sep 29 16:58:52 1994 Mike Stump <mrs@cygnus.com>
+
+ * typeck.c (c_expand_return): Use magic so the backend can fixup the
+ assignment into the return register, so cleanups won't clobber it.
+
+Thu Sep 29 13:08:50 1994 Jason Merrill (jason@deneb.cygnus.com)
+
+ * method.c (hack_identifier): Don't call assemble_external for
+ template decls.
+
+ * decl.c (finish_decl): Also end temporary allocation if the decl in
+ question has a type of error_mark_node.
+
+Wed Sep 28 21:45:00 1994 Mike Stump (mrs@cygnus.com)
+
+ * typeck.c (build_modify_expr): When optimizing ?: on lhs, make sure
+ that if the ?: was a reference type, that the subparts will be also.
+
+Wed Sep 28 16:14:04 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
+
+ * except.c (register_exception_table): Use Pmode, not PTRmode.
+
+Fri Sep 23 13:54:27 1994 Jason Merrill (jason@deneb.cygnus.com)
+
+ * lex.c (do_pending_inlines): Do method synthesis after the
+ pending_inlines have been reversed.
+
Thu Sep 22 12:53:03 1994 Per Bothner (bothner@kalessin.cygnus.com)
* decl2.c (finish_file): Fix Brendan's fix: Only call
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index fa99e67..e6b2bcc 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -5773,7 +5773,12 @@ finish_decl (decl, init, asmspec_tree, need_pop)
type = TREE_TYPE (decl);
if (type == error_mark_node)
- return;
+ {
+ if (current_binding_level == global_binding_level && temporary)
+ end_temporary_allocation ();
+
+ return;
+ }
was_incomplete = (DECL_SIZE (decl) == NULL_TREE);
diff --git a/gcc/cp/gxxint.texi b/gcc/cp/gxxint.texi
index 00ff72e..2441da1 100644
--- a/gcc/cp/gxxint.texi
+++ b/gcc/cp/gxxint.texi
@@ -1199,8 +1199,7 @@ catch variables cannot be used. Only works on a Sun sparc running SunOS
variables are cleaned up in all unwinded scopes. Completed parts of
partially constructed objects are not cleaned up. Don't expect
exception handling to work right if you optimize, in fact the compiler
-will probably core dump. You can only have one source file worth of
-exception handling code. If two EH regions are the exact same size, the
+will probably core dump. If two EH regions are the exact same size, the
backend cannot tell which one is first. It punts by picking the last
one, if they tie. This is usually right. We really should stick in a
nop, if they are the same size.
@@ -1223,7 +1222,8 @@ The EH object is copied like it should be, if it is passed by value,
otherwise we get a reference directly to it.
EH objects make it through unwinding, but are subject to being
-overwritten as they are still past the top of stack.
+overwritten as they are still past the top of stack. Don't throw
+automatic objects if this is a problem.
Exceptions in catch handlers now go to outer block.
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index 3a6970b..89286b5 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -1100,23 +1100,25 @@ do_pending_inlines ()
if (yychar == PRE_PARSED_FUNCTION_DECL)
return;
- /* Note that we've seen these inlines and are dealing with them. */
- for (t = pending_inlines; t; t = t->next)
- t->deja_vu = 1;
-
/* Reverse the pending inline functions, since
they were cons'd instead of appended. */
{
- struct pending_inline *prev = 0, *tail;
+ struct pending_inline *prev = 0, *tail, *bottom = 0;
t = pending_inlines;
pending_inlines = 0;
for (; t; t = tail)
{
tail = t->next;
+ t->next = prev;
+ t->deja_vu = 1;
+ prev = t;
+ }
- /* This kludge should go away when synthesized methods are handled
- properly, i.e. only when needed. */
+ /* This kludge should go away when synthesized methods are handled
+ properly, i.e. only when needed. */
+ for (t = prev; t; t = t->next)
+ {
if (t->lineno <= 0)
{
tree f = t->fndecl;
@@ -1134,13 +1136,18 @@ do_pending_inlines ()
default:
;
}
- obstack_free (&synth_obstack, t);
- continue;
+ if (tail)
+ tail->next = t->next;
+ else
+ prev = t->next;
+ if (! bottom)
+ bottom = t;
}
-
- t->next = prev;
- prev = t;
+ else
+ tail = t;
}
+ if (bottom)
+ obstack_free (&synth_obstack, bottom);
t = prev;
}
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 61598fa..f32d005 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -1480,11 +1480,13 @@ hack_identifier (value, name, yychar)
if (really_overloaded_fn (value))
{
tree t = get_first_fn (value);
- while (t)
+ for (; t; t = DECL_CHAIN (t))
{
+ if (TREE_CODE (t) == TEMPLATE_DECL)
+ continue;
+
assemble_external (t);
TREE_USED (t) = 1;
- t = DECL_CHAIN (t);
}
}
else if (TREE_CODE (value) == TREE_LIST)
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index b4b7e2d..21ae121 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -5388,9 +5388,9 @@ build_modify_expr (lhs, modifycode, rhs)
so the code to compute it is only emitted once. */
tree cond
= build_conditional_expr (TREE_OPERAND (lhs, 0),
- build_modify_expr (TREE_OPERAND (lhs, 1),
+ build_modify_expr (convert (TREE_TYPE (lhs), TREE_OPERAND (lhs, 1)),
modifycode, rhs),
- build_modify_expr (TREE_OPERAND (lhs, 2),
+ build_modify_expr (convert (TREE_TYPE (lhs), TREE_OPERAND (lhs, 2)),
modifycode, rhs));
if (TREE_CODE (cond) == ERROR_MARK)
return cond;
@@ -7099,9 +7099,11 @@ c_expand_return (retval)
/* Here is where we finally get RETVAL into RESULT.
`expand_return' does the magic of protecting
RESULT from cleanups. */
+ retval = build1 (CLEANUP_POINT_EXPR, TREE_TYPE (result), retval);
+ /* This part _must_ come second, because expand_return looks for
+ the INIT_EXPR as the toplevel node only. :-( */
retval = build (INIT_EXPR, TREE_TYPE (result), result, retval);
TREE_SIDE_EFFECTS (retval) = 1;
- retval = build1 (CLEANUP_POINT_EXPR, TREE_TYPE (result), retval);
expand_return (retval);
}
else
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index 65e4ba7..dd6364e 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -906,7 +906,7 @@ process_init_constructor (type, init, elts)
{
error ("non-empty initializer for array of empty elements");
/* Just ignore what we were supposed to use. */
- tail1 = 0;
+ tail1 = NULL_TREE;
}
tail = tail1;
}
@@ -1154,7 +1154,9 @@ build_scoped_ref (datum, types)
if (TREE_CODE (types) == SCOPE_REF)
{
/* We have some work to do. */
- struct type_chain { tree type; struct type_chain *next; } *chain = 0, *head = 0, scratch;
+ struct type_chain
+ { tree type; struct type_chain *next; }
+ *chain = NULL, *head = NULL, scratch;
ref = build_unary_op (ADDR_EXPR, datum, 0);
while (TREE_CODE (types) == SCOPE_REF)
{