[Ada] Ensure constructor is a C++ constructor
authorArnaud Charlet <charlet@adacore.com>
Thu, 10 Oct 2019 15:25:32 +0000 (15:25 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Thu, 10 Oct 2019 15:25:32 +0000 (15:25 +0000)
2019-10-10  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

* freeze.adb (Freeze_Subprogram): Ensure constructor is a C++
constructor.

From-SVN: r276835

gcc/ada/ChangeLog
gcc/ada/freeze.adb

index a0084fa..b17b608 100644 (file)
@@ -1,4 +1,4 @@
-2019-10-10  Gary Dismukes  <dismukes@adacore.com>
+2019-10-10  Arnaud Charlet  <charlet@adacore.com>
 
-       * libgnat/a-ststio.ads (File_Type): Apply pragma
-       Preelaborable_Initialization to the type.
\ No newline at end of file
+       * freeze.adb (Freeze_Subprogram): Ensure constructor is a C++
+       constructor.
\ No newline at end of file
index 93e91b2..5e1b775 100644 (file)
@@ -8780,6 +8780,7 @@ package body Freeze is
       --  (either in pragma CPP_Constructor or in a pragma import).
 
       if Is_Constructor (E)
+        and then Convention (E) = Convention_CPP
         and then
            (No (Interface_Name (E))
               or else String_Equal