comp.lang.ada
 help / color / mirror / Atom feed
* Convention aspect stricter than before? - GNAT Community 2020
@ 2020-06-03 17:59 Jesper Quorning
  2020-06-03 18:35 ` Jeffrey R. Carter
  2020-08-04 13:31 ` Fabien Chouteau
  0 siblings, 2 replies; 13+ messages in thread
From: Jesper Quorning @ 2020-06-03 17:59 UTC (permalink / 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;

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-08-11 19:23 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-03 17:59 Convention aspect stricter than before? - GNAT Community 2020 Jesper Quorning
2020-06-03 18:35 ` 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

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