This is the mail archive of the gcc@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: g++ parser problem


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


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