This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: g++ parser problem
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Paolo Carlini <pcarlini at suse dot de>
- Cc: Robert Schweikert <Robert dot Schweikert at abaqus dot com>, gcc-dev-lst <gcc at gcc dot gnu dot org>
- Date: 19 Jan 2004 19:27:27 +0100
- Subject: Re: g++ parser problem
- Organization: Integrable Solutions
- References: <1074535620.9026.93.camel@cheetah.hks.com> <400C1FD0.800@suse.de>
Paolo Carlini <pcarlini@suse.de> writes:
| Robert Schweikert wrote:
|
| > #include <new>
| >
| > using namespace std;
| >
| > int main ()
| > {
| >
| > throw(std::bad_alloc());
| > }
|
| Weird!
|
| In any case, the problem doesn't affect the prereleases of
| gcc-3.4 (which includes a new hand-crafted parser).
|
| This kind of issue is unlikely to be fixed in 3.3.x.
Yep. It is an issue that the new parser (in GCC-3.4.x) had to fix
(and it is fixed there!).
A workaround is to remove the Lisp-like construct from it, i.e. this
works for all the mentioned GCC releases.
#include <new>
#include <stdexcept>
int main() { throw std::bad_alloc(); }
-- Gaby