[Ada] Consistent wording for missing -gnat2020 switch

Pierre-Marie de Rodat derodat@adacore.com
Thu Dec 17 10:50:08 GMT 2020


Reuse Error_Msg_Ada_2020_Feature to complain about a missing -gnat2020
switch when code that would be legal in Ada 2020 is compiled in an
earlier language version.

Also, refer to language construct and not to syntactic category of the
missing feature, i.e. "declare expression" and not "declare_expression".

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* par-ch3.adb (P_Identifier_Declarations): Reuse
	Error_Msg_Ada_2020_Feature for object renaming without subtype.
	* par-ch4.adb (P_Primary): Likewise for target name.
	(P_Iterated_Component_Association): Likewise for iterated
	component.
	(P_Declare_Expression): Likewise for declare expression.
	* par-ch6.adb (P_Formal_Part): Likewise for aspect on formal
	parameter.
	* sem_aggr.adb (Resolve_Delta_Aggregate): Ditto.
	* sem_ch8.adb (Analyze_Object_Renaming): Reuse
	Error_Msg_Ada_2020_Feature.
	* sem_ch13.adb (Validate_Aspect_Aggregate): Reuse
	Error_Msg_Ada_2020_Feature; use lower case for "aspect" and
	don't use underscore for "Ada_2020"; don't give up on analysis
	in Ada 2012 mode.
	(Validate_Aspect_Stable_Properties): Reuse
	Error_Msg_Ada_2020_Feature; use lower case for "aspect"; minor
	style fixes.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 5400 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20201217/6f3a4ec6/attachment.bin>


More information about the Gcc-patches mailing list