This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix PR c++/17456: Infinite loop after error in convert_to_void


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]