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] Improve output of type for error messages


This patch generalizes the behavior of the error message circuit when
presented with a type that is an internal name where the first subtype
has a non-internal name. This allows simplification of a call in Sem_Res
and improves the output in the following case:

Compiling: inameerr.adb

     1. package body InameErr is
     2.    function Minus_One return T_Real is
     3.    begin
     4.       return Standard."-" (1.0) / 1.0;
                             |
        >>> expect type "T_Real" defined at inameerr.ads:2

     5.    end Minus_One;
     6. end InameErr;

Compiling: inameerr.ads

     1. generic
     2.    type T_Real is digits <>;
     3. package InameErr is
     4.    function Minus_One return T_Real;
     5. end InameErr;

The location of the definition of the type is new with
this patch.

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

2010-06-22  Robert Dewar  <dewar@adacore.com>

	* errout.adb (Unwind_Internal_Type): Improve handling of First_Subtype
	test to catch more cases where first subtype is the results we want.
	* sem_res.adb (Make_Call_Into_Operator): Don't go to First_Subtype in
	error case, since Errout will now handle this correctly.
	* gcc-interface/Make-lang.in: Add Sem_Aux to list of GNATBIND objects.
	Update dependencies.

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]