From 81501d2b45d990aaab9c0c3b85a13b4315ed567e Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Thu, 12 Nov 2015 11:49:07 +0100 Subject: [multiple changes] 2015-11-12 Emmanuel Briot * s-os_lib.ads: Documentation update. 2015-11-12 Arnaud Charlet * s-taprop-vxworks.adb, s-osinte-vxworks.ads: Use a single import of taskDelay to avoid confusion. 2015-11-12 Ed Schonberg * exp_ch6.adb (Expand_Simple_Function_Return): If the return type is class-wide and the expression is a view conversion, remove the conversion to prevent overriding of the tag, which must be that of the object being returned. 2015-11-12 Tristan Gingold * bindgen.adb (Gen_Adainit): Code cleanup. 2015-11-12 Hristian Kirtchev * s-stalib.ads: Code cleanup. 2015-11-12 Ed Schonberg * sem_ch3.adb (Analyze_Incomplete_Type_Decl): small optimization. (Analyze_Subtype_Declaration): For floating point types, inherit dimensions. (OK_For_Limited_Init_In_05): Handle properly a conditional expression whose condition is static, and is rewritten as the branch that will be executed. 2015-11-12 Ed Schonberg * sem_attr.adb (Resolve_Attribute, case 'Access): If the context type is an access constant type, do not mark the attribute reference as a possible modification of the prefix. From-SVN: r230226 --- gcc/ada/sem_attr.adb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/ada/sem_attr.adb') diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 7112869..eaaeb15 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -9993,6 +9993,9 @@ package body Sem_Attr is -- to a missed warning (the Valid check does not really -- modify!) If this case, Note will be reset to False. + -- Skip it as well if the type is an Acccess_To_Constant, + -- given that no use of the value can modify the prefix. + begin if Attr_Id = Attribute_Unrestricted_Access and then Nkind (PN) = N_Function_Call @@ -10006,6 +10009,9 @@ package body Sem_Attr is then Note := False; end if; + + elsif Is_Access_Constant (Typ) then + Note := False; end if; if Note then -- cgit v1.1