comp.lang.ada
 help / color / mirror / Atom feed
From: Jesper Quorning <jesper.quorning@gmail.com>
Subject: Convention aspect stricter than before? - GNAT Community 2020
Date: Wed, 3 Jun 2020 10:59:00 -0700 (PDT)
Date: 2020-06-03T10:59:00-07:00	[thread overview]
Message-ID: <b3b95127-bee2-47e2-aa9d-8d0a66668c0b@googlegroups.com> (raw)


The specification below compiles with CE2019 and GPL2017 but is rejected by CE2020:

c_convention_records.ads:5:04: representation item must appear after type is fully defined

Is this expected behaviour?

CE2020 accepts the specification when pragma Convention is used as for Record_2.

Is there an Ada 2012 way to solve this without moving Private_Record out of private part or using a pragma?


/Jesper

--
package C_Convention_Records is

   type Private_Record is private;

   type Record_1 is record  --  Line 5
      Dummy : Integer;
      Priv  : Private_Record;
   end record
     with Convention => C;

   type Record_2 is record
      Dummy : Integer;
      Priv  : Private_Record;
   end record;
   pragma Convention (C, Record_2);

private

   type Private_Record is record
      Dummy : Integer;
   end record
     with Convention => C;

end C_Convention_Records;

             reply	other threads:[~2020-06-03 17:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-03 17:59 Jesper Quorning [this message]
2020-06-03 18:35 ` Convention aspect stricter than before? - GNAT Community 2020 Jeffrey R. Carter
2020-08-04 13:31 ` Fabien Chouteau
2020-08-08  3:29   ` Randy Brukardt
2020-08-08  9:46     ` Luke A. Guest
2020-08-10  0:15       ` Randy Brukardt
2020-08-10  6:35         ` Luke A. Guest
2020-08-10  9:15           ` Simon Wright
2020-08-10 14:53             ` Luke A. Guest
2020-08-11  7:18           ` Jesper Quorning
2020-08-11  7:34             ` Luke A. Guest
2020-08-11 16:23               ` Jesper Quorning
2020-08-11 19:23                 ` Luke A. Guest
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox