Topic: Cannot throw enumerated types?!?
Author: cgeorge@hobbes.nwafc.nf.ca (Chris George)
Date: 1996/08/01 Raw View
Has anyone had any problems throwing enumerated types?
I am using an enumerated type to determine different errors,
but execution continues after a throw statement containing
one. And I know that execution is reaching the throw statement.
I have no idea what is going on. I am adhering to the syntax
described in the C++ Standard Working Paper (available @
http://www.cygnus.com/misc/wp/draft).
Is it possible that enumerated types cannot be thrown?
Has anyone got any ideas? I'm sure out.
Thank you in advance.
*
* Chris George
* St. John's, Newfoundland
* cgeorge@cs.mun.ca
* cgeorge@athena.nwafc.nf.ca
*
---
[ comp.std.c++ is moderated. To submit articles: Try just posting with your
newsreader. If that fails, use mailto:std-c++@ncar.ucar.edu
comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
Comments? mailto:std-c++-request@ncar.ucar.edu
]
Author: Alexandre Oliva <oliva@dcc.unicamp.br>
Date: 1996/08/02 Raw View
cgeorge@hobbes.nwafc.nf.ca (Chris George) writes:
> Has anyone had any problems throwing enumerated types?
> Is it possible that enumerated types cannot be thrown?
> Has anyone got any ideas? I'm sure out.
It is probably a compiler bug. Some compilers, such as the current
release of g++, do not support exception handling in all platforms.
--
Alexandre Oliva
oliva@dcc.unicamp.br
Universidade Estadual de Campinas, S=E3o Paulo, Brasil
---
[ comp.std.c++ is moderated. To submit articles: try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
[ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu ]
Author: cgeorge@hobbes.nwafc.nf.ca (Chris George)
Date: 1996/08/02 Raw View
Well, I have found the problem. G++'s optimization flag (-O)
somehow disables exception handling.
Also, the code from my last posting generates an Abort(core dump)
because of the string constant. The code is similiar to an example
in the C++ Standard Working Paper. Maybe g++ is not fully compliant
to that document.
Chris
---
[ comp.std.c++ is moderated. To submit articles: Try just posting with your
newsreader. If that fails, use mailto:std-c++@ncar.ucar.edu
comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
Comments? mailto:std-c++-request@ncar.ucar.edu
]
Author: Alexandre Oliva <oliva@dcc.unicamp.br>
Date: 1996/08/05 Raw View
cgeorge@hobbes.nwafc.nf.ca (Chris George) writes:
> Well, I have found the problem. G++'s optimization flag (-O)
> somehow disables exception handling.
>
> Also, the code from my last posting generates an Abort(core dump)
> because of the string constant. The code is similiar to an example
> in the C++ Standard Working Paper. Maybe g++ is not fully compliant
> to that document.
Exception handling in g++ 2.7.2 is still alpha in most platforms, and
it does not work with optimization, as noted in the documentation.
--
Alexandre Oliva
oliva@dcc.unicamp.br
Universidade Estadual de Campinas, S=E3o Paulo, Brasil
---
[ comp.std.c++ is moderated. To submit articles: Try just posting with your
newsreader. If that fails, use mailto:std-c++@ncar.ucar.edu
comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
Comments? mailto:std-c++-request@ncar.ucar.edu
]