This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] use proper name for Type_Invariant'Class in messages


In some error messages, the aspect name Type_Invariant'Class
appeared as Type_Invariant_Class, this is now fixed. The
following is compiled with -gnatl -gnatj60:

     1. package Class_Aspect is
     2.    type A_T is tagged private;
     3.    procedure P (Arg : Integer) with
     4.      Pre'Class => True,
             |
        >>> aspect "Pre'Class" can only be specified for a
            primitive operation of a tagged type

     5.      Post'Class => True;
             |
        >>> aspect "Post'Class" can only be specified for a
            primitive operation of a tagged type

     6. private
     7.     type A_T is tagged null record
     8.     with Type_Invariant'Class => True;
                 |
        >>> aspect "Type_Invariant'Class" only allowed for
            private type declared in visible part

     9. end Class_Aspect;

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

2015-02-20  Robert Dewar  <dewar@adacore.com>

	* errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
	* erroutc.adb (Set_Msg_Str): Replace _xxx.
	(Pre/Post/Type_Invariant) by xxx'Class.
	* erroutc.ads (Set_Msg_Str): Replace _xxx.
	(Pre/Post/Type_Invariant) by xxx'Class.
	* sem_prag.adb (Fix_Error): Remove special casing of
	Name_uType_Invariant.
	(Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
	Name_uPre and Name_uPost in aspect case (done in Errout now).

Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]