aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch3.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2012-01-06 15:48:05 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2012-01-06 15:48:05 +0100
commit4913e24c20f58de96248db4bb8506c8b2678d799 (patch)
tree14b273463371d190969b1946bbd551ae4fc4f537 /gcc/ada/sem_ch3.adb
parent86d71fcabfba7a1f288ea6b90e7228705d6f5b99 (diff)
downloadgcc-4913e24c20f58de96248db4bb8506c8b2678d799.zip
gcc-4913e24c20f58de96248db4bb8506c8b2678d799.tar.gz
gcc-4913e24c20f58de96248db4bb8506c8b2678d799.tar.bz2
[multiple changes]
2012-01-06 Robert Dewar <dewar@adacore.com> * a-wichha.ads, a-wichun.ads, a-zchhan.ads, a-zchuni.ads, s-utf_32.ads: Add pragma Pure * s-utf_32.adb: Suppress warnings on non-static constants (now that this is Pure). 2012-01-06 Bob Duff <duff@adacore.com> * s-rpc.ads (Read, Write): Add overriding indicators. 2012-01-06 Robert Dewar <dewar@adacore.com> * gnat_rm.texi: Add documentation for conventions Ada_Pass_By_Copy and Ada_Pass_By_Reference. 2012-01-06 Gary Dismukes <dismukes@adacore.com> * a-tienio.adb (Put): Add exception message on raise statements. Remove unneeded blocks and object declarations. 2012-01-06 Robert Dewar <dewar@adacore.com> * sem_prag.adb: Minor reformatting. 2012-01-06 Ed Schonberg <schonberg@adacore.com> * sinfo.ads, sinfo.adb (Has_Prefixed_Call): New flag to indicate that a selected component within a generic unit has been resolved as a prefixed call with local references. * sem_ch3.adb (Is_Visible_Component): In an instance body a selected component is always visible. * sem_ch4.adb (Analyze_Selected_Component): If the node is a prefixed call in an instance, do not look for visible components of the type. * sem_ch12.adb (Reset_Entity): If a selected component has resolved to a prefixed call, mark the node accordingly when prefix and selector are local references. From-SVN: r182954
Diffstat (limited to 'gcc/ada/sem_ch3.adb')
-rw-r--r--gcc/ada/sem_ch3.adb29
1 files changed, 3 insertions, 26 deletions
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 50c9d3d..88ef267 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -16300,34 +16300,11 @@ package body Sem_Ch3 is
then
return True;
- -- If we are in the body of an instantiation, the component is visible
- -- if the parent type is non-private, or in an enclosing scope. The
- -- scope stack is not present when analyzing an instance body, so we
- -- must inspect the chain of scopes explicitly.
+ -- In the body of an instantiation, no need to check for the visibility
+ -- of a component.
elsif In_Instance_Body then
- if not Is_Private_Type (Scope (C)) then
- return True;
-
- else
- declare
- S : Entity_Id;
-
- begin
- S := Current_Scope;
- while Present (S)
- and then S /= Standard_Standard
- loop
- if S = Type_Scope then
- return True;
- end if;
-
- S := Scope (S);
- end loop;
-
- return False;
- end;
- end if;
+ return True;
-- If the component has been declared in an ancestor which is currently
-- a private type, then it is not visible. The same applies if the