exceptions in c
Massimiliano Cialdi
cialdi@gmail.com
Sat Feb 12 00:15:00 GMT 2005
On Fri, 11 Feb 2005 13:38:21 +0100 (CET)
Vincent Torri <torri@iecn.u-nancy.fr> wrote:
> http://ldeniau.home.cern.ch/ldeniau/html/exception/exception.html
I tried the source code in attach compiled with:
gcc -mconsole -Wall -DDEBUG_THROW exc.c exception.c -o exc
(I use mingw/msys, gcc 3.2.3)
if E_test is dfined to be 0 I obtain:
exc.c(30)-f: exception 'E_test' (id 0) thrown
unknow 1
I correctly throw 0, but I catch 1.
if I define E_test 1, 2 and so on it works well (wath I throw is what I
catch)
why this strage behaviour?
thanks
ps: I also tried under linux, gcc 2.96 with the same results
--
Massimiliano Cialdi
cialdi@gmail.com
m.cialdi@oksys.it
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exc.c
Type: text/x-c
Size: 364 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20050212/0a34ec8e/attachment.bin>
More information about the Gcc-help
mailing list