C++ Exception handling

Graham Shaw gdshaw at sagitta.demon.co.uk
Thu Feb 26 22:55:30 PST 2004


In article <e7e4b9864c.peter at chocky.org>,
   Peter Naulls <peter at chocky.org> wrote:
> In message <403DC0E8.30902 at dsvr.net>
>           Nick Burrett <nick at dsvr.net> wrote:

> > 
> > 
> > I've never heard or seen any reports of exception handling issues.

> [snip]

> I've had several, but none that were able to be boiled down to a
> useful bug report until very recently.  

> Try this, in either version of GCC:

> "libfile -v"

Before there are too many complaints about my patch not working, this is
an entirely different bug that is local to libfile.  A separate patch will
follow shortly.

To trigger the error that I was investigating, you need something along
the lines of:

> class my_class
> {
> public:
>     my_class()
>       { throw "error"; }
> };
> 
> int main()
> {
>     my_class *c = 0;
>     try
>     {
>         c = new my_class;
>     }
>     catch (const char *message)
>     {
>         printf("Message: %s\n",message);
>     }
>     return 0;
> }

-- 
Graham Shaw (http://www.sagitta.demon.co.uk/graham/)
The RISC OS Packaging Project (http://www.riscpkg.org/)
The RISC OS Toolkit (http://rtk.riscos.org.uk/)




More information about the gcc mailing list