diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-26 09:59:24 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-26 09:59:24 +0000 |
commit | 75f7f24d5106a2573e253697999f1924c57cd5d1 (patch) | |
tree | e1b32d8e1671c72e0a4bafe5df74c859a9f1e2b0 /gcc/ada/sem_ch6.adb | |
parent | a94695337aa5a27a5de8e6c65656ca167985150b (diff) | |
download | gcc-75f7f24d5106a2573e253697999f1924c57cd5d1.tar.gz |
2012-04-26 Robert Dewar <dewar@adacore.com>
* sem_ch5.adb (Check_Unreachable_Code): Skip past pragmas.
2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
* s-finroo.ads: Remove with clause for
Ada.Streams. Type Root_Controlled is now abstract tagged null
record. Remove internal package Stream_Attributes. Root_Controlled
doesn't need stream attribute redeclaration and avoids the
dependency on streams.
2012-04-26 Tristan Gingold <gingold@adacore.com>
* adaint.c (to_host_path_spec): Removed (unused).
Minor reformatting.
2012-04-26 Steve Baird <baird@adacore.com>
* gnat_rm.texi Improve description of Valid_Scalars attribute.
2012-04-26 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Can_Override_Operator): If the formal is a
generic type the operator cannot be overriding.
2012-04-26 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb (Spec_Reloaded_For_Body): Check whether the type
is declared in a package specification, and current unit is the
corresponding package body. The use clauses themselves may be
within a nested package.
2012-04-26 Bob Duff <duff@adacore.com>
* exp_ch2.adb (Param_Entity): Take into account the case where
the type of the entry parameter has a representation clause.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186870 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch6.adb')
-rw-r--r-- | gcc/ada/sem_ch6.adb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 920cb0cd0ac..e8aa81c307c 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -7383,6 +7383,7 @@ package body Sem_Ch6 is function Can_Override_Operator (Subp : Entity_Id) return Boolean is Typ : Entity_Id; + begin if Nkind (Subp) /= N_Defining_Operator_Symbol then return False; @@ -7390,7 +7391,10 @@ package body Sem_Ch6 is else Typ := Base_Type (Etype (First_Formal (Subp))); + -- Check explicitly that the operation is a primitive of the type + return Operator_Matches_Spec (Subp, Subp) + and then not Is_Generic_Type (Typ) and then Scope (Subp) = Scope (Typ) and then not Is_Class_Wide_Type (Typ); end if; |