aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_prag.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-11-04 11:55:41 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2011-11-04 11:55:41 +0100
commita51cd0ece5f46761fdf91ddc562b8328974dbfc8 (patch)
treea2ed65f5513e0ee836542dd2d9c685f3e21743b9 /gcc/ada/sem_prag.adb
parent635c6321d455dd13aeb1d5d19615fd10407dd71d (diff)
downloadgcc-a51cd0ece5f46761fdf91ddc562b8328974dbfc8.zip
gcc-a51cd0ece5f46761fdf91ddc562b8328974dbfc8.tar.gz
gcc-a51cd0ece5f46761fdf91ddc562b8328974dbfc8.tar.bz2
[multiple changes]
2011-11-04 Robert Dewar <dewar@adacore.com> * sem_warn.adb (Warn_On_Useless_Assignment): More accurate test for call vs assign. * gcc-interface/Make-lang.in: Update dependencies. 2011-11-04 Robert Dewar <dewar@adacore.com> * sem_prag.adb: Detect more cases of Long_Float inconsistencies at compile time. 2011-11-04 Matthew Heaney <heaney@adacore.com> * Makefile.rtl, impunit.adb: Added a-sfecin.ads, * a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb], a-sbhcin.ad[sb], a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb], a-sulcin.ad[sb] * a-sfecin.ads, a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb], a-sbhcin.ad[sb], a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb], a-sulcin.ad[sb]: New files. 2011-11-04 Geert Bosch <bosch@adacore.com> * i-forbla-unimplemented.ads, s-gecola.adb, s-gecola.ads, s-gerebl.adb, s-gerebl.ads, i-forbla.adb, i-forbla.ads, i-forlap.ads, i-forbla-darwin.adb, s-gecobl.adb, s-gecobl.ads, s-gerela.adb, s-gerela.ads: Remove partial interface to BLAS/LAPACK. * gcc-interface/Makefile.in: Remove libgnala and related objects. From-SVN: r180935
Diffstat (limited to 'gcc/ada/sem_prag.adb')
-rw-r--r--gcc/ada/sem_prag.adb33
1 files changed, 27 insertions, 6 deletions
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index 9de2f1f..70270ab 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -10952,7 +10952,8 @@ package body Sem_Prag is
-- pragma Long_Float (D_Float | G_Float);
- when Pragma_Long_Float =>
+ when Pragma_Long_Float => Long_Float : declare
+ begin
GNAT_Pragma;
Check_Valid_Configuration_Pragma;
Check_Arg_Count (1);
@@ -10967,22 +10968,42 @@ package body Sem_Prag is
if Chars (Get_Pragma_Arg (Arg1)) = Name_D_Float then
if Opt.Float_Format_Long = 'G' then
- Error_Pragma ("G_Float previously specified");
- end if;
+ Error_Pragma_Arg
+ ("G_Float previously specified", Arg1);
+
+ elsif Current_Sem_Unit /= Main_Unit
+ and then Opt.Float_Format_Long /= 'D'
+ then
+ Error_Pragma_Arg
+ ("main unit not compiled with pragma Long_Float (D_Float)",
+ "\pragma% must be used consistently for whole partition",
+ Arg1);
- Opt.Float_Format_Long := 'D';
+ else
+ Opt.Float_Format_Long := 'D';
+ end if;
-- G_Float case (this is the default, does not need overriding)
else
if Opt.Float_Format_Long = 'D' then
Error_Pragma ("D_Float previously specified");
- end if;
- Opt.Float_Format_Long := 'G';
+ elsif Current_Sem_Unit /= Main_Unit
+ and then Opt.Float_Format_Long /= 'G'
+ then
+ Error_Pragma_Arg
+ ("main unit not compiled with pragma Long_Float (G_Float)",
+ "\pragma% must be used consistently for whole partition",
+ Arg1);
+
+ else
+ Opt.Float_Format_Long := 'G';
+ end if;
end if;
Set_Standard_Fpt_Formats;
+ end Long_Float;
-----------------------
-- Machine_Attribute --