Mail Archives: djgpp-workers/1998/03/04/20:08:57
Could sombody with gcc 2.8 try the following test program? It should work
as the linux version does. I think I tried to ask this earlier but
all my mail was bouncing for a whil and I forgot to resend it.
Thanks
Andy
> void f(int x) throw(int)
> {
> if (x > 10)
> throw(x);
>
> cout << "f: " << x << endl;
> }
>
> int main(void)
> {
> try
> {
> f(5);
> f(9);
> f(11);
> }
> catch(int i)
> {
> cout << "Error: Argument to f() was too large (" << i << ")" << endl;
> }
> return 0;
> }
>
>
> When compiled with the PGCC release based on EGCS 1.0.1 the output is the
> following:
>
> f: 5
> f: 9
> Abort!
>
> i.e. when the exception are thrown as 11 is passed to f(), I just get the
> abort message. When compiled with GCC 2.8.0 (under linux) the output is the
> following:
>
> f: 5
> f: 9
> Error: Argument to f() was too large (11)
>
> i.e. the expected output (atleast what I expected).
- Raw text -