[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#261997: marked as done (gnat-3.15: linking ada, c, and c++ fails at runtime)



Your message dated Thu, 24 Aug 2006 12:46:25 +0200
with message-id <20060824104625.GF6831@green.ada-france.org>
and subject line gnat-3.15: linking ada, c, and c++ fails at runtime
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: libgnat-3.15p-1
Version: 3.15p-10
Severity: important
File: gnat-3.15

also involves using g++ (gcc version 3.3.4 (Debian 1:3.3.4-6)).

Try the following:

file cplusplus.cpp contains
#include <iostream>

void except (void) {
  try {
    std::cout << "before" << std::endl;
    throw 42;
    std::cout << "after" << std::endl;
  }
  catch (...) {
    std::cout << "handle" << std::endl;
  }
}

extern "C" void fun (void) { except(); }

file cpp.adb contains
procedure Cpp
is

   procedure Fun;
   pragma Import (C, Fun, "fun");

begin
   Fun;
end Cpp;


Now for compilation do
g++ -c cplusplus.cpp
gnatmake cpp -largs cplusplus.o --LINK=g++

./cpp

which gives 
before

raised PROGRAM_ERROR : unhandled signal

The program immediately crashes when raising an exception within the c++
part of the programm.

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.4.24
Locale: LANG=C, LC_CTYPE=de_DE.UTF-8

Versions of packages libgnat-3.15p-1 depends on:
ii  libc6                       2.3.2.ds1-13 GNU C Library: Shared libraries an

-- no debconf information


--- End Message ---
--- Begin Message ---
Version: 1.37

gcc-defaults 1.37 provides the new default Ada compiler (namely GCC 4.1)
which fixes this bug.

-- 
Ludovic Brenta.


--- End Message ---

Reply to: