From 518fed76bc0e6ae59759d248e1717117921427e6 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Mon, 5 Feb 2001 17:15:33 +0000 Subject: [PATCH] method.c (build_mangled_name): Protect flush_repeats() from error_mark_node. * method.c (build_mangled_name) [old abi]: Protect flush_repeats() from error_mark_node. From-SVN: r39460 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/method.c | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 04d64a0c824..72bc2f07435 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2001-02-05 Alexandre Oliva + + * method.c (build_mangled_name) [old abi]: Protect flush_repeats() + from error_mark_node. + 2001-02-05 Nathan Sidwell Fix specification and implementation bugs in V3 ABI diff --git a/gcc/cp/method.c b/gcc/cp/method.c index 51e0c5c3cb9..30ede1b600a 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -1213,6 +1213,16 @@ build_mangled_name (parmtypes, begin, end) nrepeats = 0; } + /* Insead of protecting flush_repeats() against + error_mark_node, we can do it here. Since we wouldn't + add anything for an ERROR_MARK anyway, it's ok to skip + the mangling for this type. */ + if (old_style_repeats && parmtype == error_mark_node) + { + last_type = NULL_TREE; + continue; + } + last_type = parmtype; /* Note that for bug-compatibility with 2.7.2, we can't build up -- 2.30.2