From c31b57af9064a673ef4958a35a709735754e0afe Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Thu, 12 Nov 2015 10:59:25 +0000 Subject: einfo.ads (Overlays_Constant): Document usage for E_Constant. 2015-11-12 Eric Botcazou * einfo.ads (Overlays_Constant): Document usage for E_Constant. * freeze.adb (Warn_Overlay): Small reformatting. (Check_Address_Clause): Deal specifically with deferred constants. For a variable or a non-imported constant overlaying a constant object and with initialization value, either remove the initialization or issue a warning. Fix a couple of typos. * sem_util.adb (Note_Possible_Modification): Overhaul the condition for the warning on modified constants and use Find_Overlaid_Entity instead of doing it manually. * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Compute and set Overlays_Constant once on entry. Do not treat the overlaid entity as volatile. Do not issue the warning on modified constants here. * gcc-interface/decl.c (gnat_to_gnu_entity) : Remove over-restrictive condition for the special treatment of deferred constants. : Remove obsolete associated code. From-SVN: r230229 --- gcc/ada/gcc-interface/decl.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'gcc/ada/gcc-interface/decl.c') diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index 59754b6..0c59ab3a 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -506,7 +506,6 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) /* Ignore constant definitions already marked with the error node. See the N_Object_Declaration case of gnat_to_gnu for the rationale. */ if (definition - && gnu_expr && present_gnu_tree (gnat_entity) && get_gnu_tree (gnat_entity) == error_mark_node) { @@ -1186,13 +1185,6 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) } } - /* If this is a deferred constant, the initializer is attached to - the full view. */ - if (kind == E_Constant && Present (Full_View (gnat_entity))) - gnu_expr - = gnat_to_gnu - (Expression (Declaration_Node (Full_View (gnat_entity)))); - /* If we don't have an initializing expression for the underlying variable, the initializing expression for the pointer is the specified address. Otherwise, we have to make a COMPOUND_EXPR -- cgit v1.1