From c775e4a16cd3e99a9dd857db0dd2229c44a44c46 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Tue, 5 Aug 2008 11:30:53 +0200 Subject: [PATCH] sem_ch3.adb (Analyze_Object_Declaration): Avoid type Any_Access in unresolved initial value of "null"... 2008-08-05 Bob Duff * sem_ch3.adb (Analyze_Object_Declaration): Avoid type Any_Access in unresolved initial value of "null", because it causes implicitly generated "=" operators to be ambiguous, and because this type should not be passed to gigi. From-SVN: r138693 --- gcc/ada/ChangeLog | 45 +++++++++++++++++++++++++++++++++++++++++++++ gcc/ada/sem_ch3.adb | 9 +++++++++ 2 files changed, 54 insertions(+) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 505baed2f6b9..9a4800006c7e 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,48 @@ +2008-08-05 Jose Ruiz + + * init.c (__gnat_install_handler for linux): If we are building the + Xenomai run time then we need to do two additional things: avoid + memory swapping and transform the Linux environment task into a native + Xenomai task. + + * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for xenomai run + time): Use interface to Xenomai native skin and avoid linux-specific + way of setting CPU affinity. + (EH_MECHANISM for the xenomai run time): Use sjlj exception mechanism. + +2008-08-05 Bob Duff + + * checks.ads: Minor comment fix + +2008-08-05 Thomas Quinot + + * g-sercom.adb, g-sercom.ads, g-sercom-mingw.adb, + g-sercom-linux.adb (Data_Bits): Change literals B7 and B8 to CS7 and + CS8. + +2008-08-05 Robert Dewar + + * mlib.adb: Minor code reorganization + Minor reformatting + + * make.adb: Minor reformatting + + * prj-attr.ads: Minor reformatting + + * s-os_lib.adb: Minor reformatting + + * s-fileio.adb: Minor code reorganization + Minor reformatting + + * prj.ads: Minor reformatting + +2008-08-05 Bob Duff + + * sem_ch3.adb (Analyze_Object_Declaration): Avoid type Any_Access in + unresolved initial value of "null", because it causes implicitly + generated "=" operators to be ambiguous, and because this type should + not be passed to gigi. + 2008-08-05 Vincent Celier * mlib.adb: Update comments. diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 1543e254c89f..cf31e49d5459 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -2550,6 +2550,15 @@ package body Sem_Ch3 is Set_Etype (Id, T); Resolve (E, T); + -- If E is "null", and has been replaced by an + -- N_Raise_Constraint_Error node (which was marked already-analyzed), + -- we need to set the type to something other than Any_Access in + -- order to keep gigi happy. + + if Etype (E) = Any_Access then + Set_Etype (E, T); + end if; + -- If the object is an access to variable, the initialization -- expression cannot be an access to constant. -- 2.47.2