Make sure warnings about wrong-length aggregates don't get suppressed. Such a warning (in a with-ed unit) can be the only explanation for an error about No_Elaboration_Code violations. Avoid passing a bogus "#" to Error_Msg. We really should never construct message templates by concatenating strings that can come from input data, but there are too many cases of that to clean up. The message template parameters should really be of a type other than String, to avoid these kinds of bugs, but again, that's too much work to clean up now. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * checks.adb (Selected_Length_Checks): In the message for an aggregate that has too few or too many elements, add "!!" to make sure the warning gets printed in with'ed units. Note that we have to put "!!" before the "??", because Compile_Time_Constraint_Error detects warnings by comparing the last character of the message with '?' (which is bit dubious, but we're not changing that here). (Length_Mismatch_Info_Message): Use Unat for some things that can't be negative. Specify Decimal instead of Auto in calls to UI_Image. * sem_util.adb (Compile_Time_Constraint_Error): Minor. * uintp.adb (Image_Uint): It's always better to initialize objects on their declaration.