[multiple changes]

2015-01-07  Robert Dewar  <dewar@adacore.com>

	* sem_ch3.adb: Minor error message change.

2015-01-07  Ed Schonberg  <schonberg@adacore.com>

	* sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
	Following AI05-028, the pragam applies legally to any composite type.

From-SVN: r219285
This commit is contained in:
Arnaud Charlet 2015-01-07 10:31:05 +01:00
parent 95e0ceefa5
commit 7d1286f61e
3 changed files with 22 additions and 6 deletions

View File

@ -1,3 +1,12 @@
2015-01-07 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb: Minor error message change.
2015-01-07 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
Following AI05-028, the pragam applies legally to any composite type.
2015-01-07 Arnaud Charlet <charlet@adacore.com>
* s-osinte-vxworks.adb, s-osinte-vxworks.ads

View File

@ -18981,9 +18981,8 @@ package body Sem_Ch3 is
elsif Present (Expression (Discr)) then
Error_Msg_N
("(Ada 2005) access discriminants of nonlimited types",
Expression (Discr));
Error_Msg_N ("\cannot have defaults", Expression (Discr));
("(Ada 2005) access discriminants of nonlimited types "
& "cannot have defaults", Expression (Discr));
end if;
end if;
end if;

View File

@ -17839,17 +17839,25 @@ package body Sem_Prag is
then
null;
-- Check appropriate type argument
elsif Is_Private_Type (Ent)
or else Is_Protected_Type (Ent)
or else (Is_Generic_Type (Ent) and then Is_Derived_Type (Ent))
-- AI05-0028: The pragma applies to all composite types. Note
-- that we apply this binding intepretation to previous verions
-- of Ada so there is no Ada 2012 guard. Seems a reasonable
-- choice since there are other compilers that do the same.
or else Is_Composite_Type (Ent)
then
null;
else
Error_Pragma_Arg
("pragma % can only be applied to private, formal derived or "
& "protected type",
Arg1);
("pragma % can only be applied to private, formal derived, "
& "protected, or composite type", Arg1);
end if;
-- Give an error if the pragma is applied to a protected type that