This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/35886] Bad location of error message
- From: "sam at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 May 2008 22:43:20 -0000
- Subject: [Bug ada/35886] Bad location of error message
- References: <bug-35886-15321@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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