GCC 8.3.0 and Ada's foreign_exception

Kacvinsky, Tom Tom.Kacvinsky@vector.com
Wed May 20 22:00:57 GMT 2020


We have a mixed C++/Ada development environment.  One of our C++ files throws an
exception that is not caught in C++, but is caught in Ada.  The Ada exception type is
foreign_exception.  That is fine, we don't have the necessary stuff set up so that Ada
 knows how to handle a C++ exception (I did see there is a way of doing that by getting
RTTI information).

What is really puzzling is that on different platforms, we get different exit codes when Ada
exits because of the exception.  On some platforms it is 0, on others it is non-zero.  Any ideas
as to why this happens?  I would like to think that Ada would exit with a consistent exit code
between platforms.  I can understand a difference between Windows and Linux, as Windows
exit codes are (at least to me) weird.  But we are seeing differences in 32-bit Linux executables
and 64-bit Linux executables.

Any pointers are appreciated.

Thanks,

Tom


More information about the Gcc-help mailing list