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] Special error message for 'Range used as integer type definition


Surprisingly, a Range attribute reference many not be used as a signed
integer type reference. This patch gives a clearer error message in
this case as shown by this example program:

     1. package Typ_Is_Range is
     2.    S : constant String := "abc";
     3.    type T is range S'Range;
                            |
        >>> Range attribute not allowed here, use First .. Last

     4. end Typ_Is_Range;

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

2012-02-22  Robert Dewar  <dewar@adacore.com>

	* par-ch3.adb (P_Signed_Integer_Type_Definition): Specialize
	error message for 'Range.

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]