r260649 - in /trunk/gcc/ada: ChangeLog sem_prag...

pmderodat@gcc.gnu.org pmderodat@gcc.gnu.org
Thu May 24 13:05:00 GMT 2018


Author: pmderodat
Date: Thu May 24 13:05:03 2018
New Revision: 260649

URL: https://gcc.gnu.org/viewcvs?rev=260649&root=gcc&view=rev
Log:
[Ada] Spurious error on pragma Independent_Components

This patch modifies the analysis of pragma Independent_Components to account
for a side effect from handling of self-referential records which render the
pragma illegal.

------------
-- Source --
------------

--  pack.ads

package Pack is
   type OK is record
      Comp_1 : Integer;
      Comp_2 : access OK;
   end record;
   pragma Independent_Components (OK);

   type Error;
   pragma Independent_Components (Error);
   type Error is record
      Comp : Integer;
   end record;
end Pack;

----------------------------
-- Compilation and output --
----------------------------

$ gcc -c pack.ads
pack.ads:9:04: representation item must be after full type declaration

2018-05-24  Hristian Kirtchev  <kirtchev@adacore.com>

gcc/ada/

	* sem_prag.adb (Analyze_Pragma): Use the full view of an internally
	generated incomplete type.

Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/sem_prag.adb



More information about the Gcc-cvs mailing list