This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix PR c++/17456: Infinite loop after error in convert_to_void
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Volker Reichelt <reichelt at igpm dot rwth-aachen dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 18 Dec 2004 05:31:26 +0100
- Subject: Re: [patch] Fix PR c++/17456: Infinite loop after error in convert_to_void
- Organization: Integrable Solutions
- References: <200412180135.iBI1ZflI019786@relay.rwth-aachen.de>
Volker Reichelt <reichelt@igpm.rwth-aachen.de> writes:
| When compiling the following invalid code snippet
|
| ========================================
| struct A {};
|
| struct B : A
| {
| void foo();
| B() { foo; }
| };
| ========================================
|
| the 3.3-branch compiler gets into a memory-eating infinite loop after
| issuing a sensible error message. The following patch fixes that by
| setting expr to void_zero_node after the failure (like 3.4 branch
| and mainline).
|
| Bootstrapped and regtested on the 3.3 branch (i686-pc-linux-gnu).
| Gaby, ok to commit?
Yes. Please add a PR number.
Thanks,
-- Gaby