===================================================================
@@ -143,7 +143,7 @@
-- d.W Print out debugging information for Walk_Library_Items
-- d.X Old treatment of indexing aspects
-- d.Y
- -- d.Z
+ -- d.Z Do not enable expansion in configurable run-time mode
-- d1 Error msgs have node numbers where possible
-- d2 Eliminate error flags in verbose form error messages
@@ -686,6 +686,12 @@
-- is preserved temporarily for use by the modelling project under
-- debug flag d.X.
+ -- d.Z Normally we always enable expansion in configurable run-time mode
+ -- to make sure we get error messages about unsupported features even
+ -- when compiling in -gnatc mode. But expansion is turned off in this
+ -- case if debug flag -gnatd.Z is used. This is to deal with the case
+ -- where we discover difficulties in this new processing.
+
-- d1 Error messages have node numbers where possible. Normally error
-- messages have only source locations. This option is useful when
-- debugging errors caused by expanded code, where the source location
===================================================================
@@ -1410,11 +1410,33 @@
GNAT_Mode := True;
end if;
+ -- For generic main, never do expansion
+
if Generic_Main then
Expander_Mode_Save_And_Set (False);
+
+ -- Non generic case
+
else
Expander_Mode_Save_And_Set
- (Operating_Mode = Generate_Code or Debug_Flag_X);
+
+ -- Turn on expansion if generating code
+
+ (Operating_Mode = Generate_Code
+
+ -- or if special debug flag -gnatdx is set
+
+ or else Debug_Flag_X
+
+ -- Or if in configuration run-time mode. We do this so we get
+ -- error messages about missing entities in the run-time even
+ -- if we are compiling in -gnatc (no code generation) mode.
+ -- Similar processing applies to No_Run_Time_Mode. However,
+ -- don't do this if debug flag -gnatd.Z is set (this is to handle
+ -- a situation where this new processing causes trouble).
+
+ or else ((Configurable_Run_Time_Mode or No_Run_Time_Mode)
+ and not Debug_Flag_Dot_ZZ));
end if;
Full_Analysis := True;