This is the mail archive of the gcc-bugs@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]

[Bug ada/35886] Bad location of error message



------- Comment #2 from sam at gcc dot gnu dot org  2008-05-12 22:43 -------
I expect the error message to point at the full declaration itself, not the
partial view, as the partial view had been analyzed correctly and had no error
so far. When it says "full declaration of type T declared at XXX", I expect
"XXX" to designate the partial view, not the other way around.

To take a similar situation, consider:

package T is
   X : constant Integer;
private
   X : constant Float := 3.0;
end T;

GNAT gives the error:

     4.    X : constant Float := 3.0;
           |
        >>> type does not match declaration at line 2

and not:

     2.    X : constant Integer;
           |
        >>> type doesn't match declaration at line 4

I think this is an anomaly, as this doesn't match the behaviour of GNAT in
other similar cases (a completion of a declaration not fullfilling the initial
promise).


-- 

sam at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35886


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