aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_dim.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-08-01 12:24:57 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2014-08-01 12:24:57 +0200
commit73999267a3581a69fc112fb7c420231ed4213357 (patch)
tree13611c201ce517772dfcbde8a63af2bf79a07061 /gcc/ada/sem_dim.adb
parent885e570af17aed5736e4fd92347ca05e3d552926 (diff)
downloadgcc-73999267a3581a69fc112fb7c420231ed4213357.zip
gcc-73999267a3581a69fc112fb7c420231ed4213357.tar.gz
gcc-73999267a3581a69fc112fb7c420231ed4213357.tar.bz2
[multiple changes]
2014-08-01 Robert Dewar <dewar@adacore.com> * sem_ch10.adb: Minor reformatting. 2014-08-01 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Same_Generic_Actual): Make function symmetric, because either type may be a subtype of the other. 2014-08-01 Vincent Celier <celier@adacore.com> * makeusg.adb: Add documentation for debug switch -dn. 2014-08-01 Ed Schonberg <schonberg@adacore.com> * sem_dim.adb (Process_Minus, Process_Divide): Label dimension expression with standard operator and type, for pretty-printing use, when in ASIS_Mode. When generating code dimensional analysis is not involved and dimension expressions are handled statically, and other operators are resolved in the usual way. 2014-08-01 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb (Build_Derived_Record_Type): Remove setting of Parent_Subtype in ASIS mode, leads to several failures. * sem_ch4.adb (Analyze_Selected_Component): In an instance, if the prefix is a type extension, check whether component is declared in the parent type, possibly in a parent unit. Needed in ASIS mode when Parent_Subtype is not set. From-SVN: r213449
Diffstat (limited to 'gcc/ada/sem_dim.adb')
-rw-r--r--gcc/ada/sem_dim.adb20
1 files changed, 14 insertions, 6 deletions
diff --git a/gcc/ada/sem_dim.adb b/gcc/ada/sem_dim.adb
index 6bb74ee..37d2f7a 100644
--- a/gcc/ada/sem_dim.adb
+++ b/gcc/ada/sem_dim.adb
@@ -2262,10 +2262,14 @@ package body Sem_Dim is
-- Provide minimal semantic information on dimension expressions,
-- even though they have no run-time existence. This is for use by
- -- ASIS tools, in particular pretty-printing.
+ -- ASIS tools, in particular pretty-printing. If generating code
+ -- standard operator resolution will take place.
+
+ if ASIS_Mode then
+ Set_Entity (N, Standard_Op_Minus);
+ Set_Etype (N, Standard_Integer);
+ end if;
- Set_Entity (N, Standard_Op_Minus);
- Set_Etype (N, Standard_Integer);
return Result;
end Process_Minus;
@@ -2294,10 +2298,14 @@ package body Sem_Dim is
-- Provide minimal semantic information on dimension expressions,
-- even though they have no run-time existence. This is for use by
- -- ASIS tools, in particular pretty-printing.
+ -- ASIS tools, in particular pretty-printing. If generating code
+ -- standard operator resolution will take place.
+
+ if ASIS_Mode then
+ Set_Entity (N, Standard_Op_Divide);
+ Set_Etype (N, Standard_Integer);
+ end if;
- Set_Entity (N, Standard_Op_Divide);
- Set_Etype (N, Standard_Integer);
return Result;
end Process_Divide;