diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-06-22 10:40:51 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-06-22 10:40:51 +0200 |
commit | 88b17d450602da928cabdfcbb324de8e76c4e8c4 (patch) | |
tree | df1b05a1f1519cf3236f73c1b27614894acb0ace /gcc/ada | |
parent | 29214696c8b7a2582378107a26a8d4fd8fe67f28 (diff) | |
download | gcc-88b17d450602da928cabdfcbb324de8e76c4e8c4.zip gcc-88b17d450602da928cabdfcbb324de8e76c4e8c4.tar.gz gcc-88b17d450602da928cabdfcbb324de8e76c4e8c4.tar.bz2 |
[multiple changes]
2010-06-22 Ed Schonberg <schonberg@adacore.com>
* uintp.adb: Fix scope error in operator call.
2010-06-22 Vincent Celier <celier@adacore.com>
* makeutl.adb (Executable_Prefix_Path): on VMS, return "/gnu/".
* prj-conf.adb (Get_Or_Create_Configuration_File): On VMS, if
autoconfiguration is needed, fail indicating that no config project
file can be found, as there is no autoconfiguration on VMS.
2010-06-22 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Make_Call_Into_Operator): Diagnose an incorrect scope
for an operator in a functional notation, when operands are universal.
From-SVN: r161147
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 16 | ||||
-rw-r--r-- | gcc/ada/makeutl.adb | 9 | ||||
-rw-r--r-- | gcc/ada/prj-conf.adb | 17 | ||||
-rw-r--r-- | gcc/ada/sem_res.adb | 25 | ||||
-rw-r--r-- | gcc/ada/uintp.adb | 4 |
5 files changed, 65 insertions, 6 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 05044fb..c33f44c 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,19 @@ +2010-06-22 Ed Schonberg <schonberg@adacore.com> + + * uintp.adb: Fix scope error in operator call. + +2010-06-22 Vincent Celier <celier@adacore.com> + + * makeutl.adb (Executable_Prefix_Path): on VMS, return "/gnu/". + * prj-conf.adb (Get_Or_Create_Configuration_File): On VMS, if + autoconfiguration is needed, fail indicating that no config project + file can be found, as there is no autoconfiguration on VMS. + +2010-06-22 Ed Schonberg <schonberg@adacore.com> + + * sem_res.adb (Make_Call_Into_Operator): Diagnose an incorrect scope + for an operator in a functional notation, when operands are universal. + 2010-06-22 Arnaud Charlet <charlet@adacore.com> * gcc-interface/Make-lang.in: Update dependencies. diff --git a/gcc/ada/makeutl.adb b/gcc/ada/makeutl.adb index ab00b50..49d64af 100644 --- a/gcc/ada/makeutl.adb +++ b/gcc/ada/makeutl.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2010, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -26,6 +26,7 @@ with ALI; use ALI; with Debug; with Fname; +with Hostparm; with Osint; use Osint; with Output; use Output; with Opt; use Opt; @@ -378,6 +379,12 @@ package body Makeutl is -- Beginning of Executable_Prefix_Path begin + -- For VMS, the path returned is always /gnu/ + + if Hostparm.OpenVMS then + return "/gnu/"; + end if; + -- First determine if a path prefix was placed in front of the -- executable name. diff --git a/gcc/ada/prj-conf.adb b/gcc/ada/prj-conf.adb index dfebd9a..757d547 100644 --- a/gcc/ada/prj-conf.adb +++ b/gcc/ada/prj-conf.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2006-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 2006-2010, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -25,6 +25,7 @@ with Ada.Directories; use Ada.Directories; with GNAT.HTable; use GNAT.HTable; +with Hostparm; with Makeutl; use Makeutl; with MLib.Tgt; with Opt; use Opt; @@ -889,8 +890,18 @@ package body Prj.Conf is <<Process_Config_File>> if Automatically_Generated then - -- This might raise an Invalid_Config exception - Do_Autoconf; + if Hostparm.OpenVMS then + + -- There is no gprconfig on VMS + + raise Invalid_Config + with "could not locate any configuration project file"; + + else + -- This might raise an Invalid_Config exception + + Do_Autoconf; + end if; end if; -- Parse the configuration file diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index ca2059d..c9f3c57 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -1422,6 +1422,31 @@ package body Sem_Res is ("& not declared in&", N, Selector_Name (Name (N))); Set_Etype (N, Any_Type); return; + + -- Detect a mismatch between the context type and the result type + -- in the named package, which is otherwise not detected if the + -- operands are universal. Check is only needed if source entity is + -- an operator, not a function that renames an operator. + + elsif Nkind (Parent (N)) /= N_Type_Conversion + and then Ekind (Entity (Name (N))) = E_Operator + and then Is_Numeric_Type (Typ) + and then not Is_Universal_Numeric_Type (Typ) + and then Scope (Base_Type (Typ)) /= Pack + and then not In_Instance + then + if Is_Fixed_Point_Type (Typ) + and then (Op_Name = Name_Op_Multiply + or else + Op_Name = Name_Op_Divide) + then + -- Already checked above + + null; + + else + Error_Msg_NE ("expect type&", N, Typ); + end if; end if; end if; diff --git a/gcc/ada/uintp.adb b/gcc/ada/uintp.adb index 3b72d15..b84ae5a 100644 --- a/gcc/ada/uintp.adb +++ b/gcc/ada/uintp.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2010, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -239,7 +239,7 @@ package body Uintp is function Hash_Num (F : Int) return Hnum is begin - return Standard."mod" (F, Hnum'Range_Length); + return Types."mod" (F, Hnum'Range_Length); end Hash_Num; --------------- |