[Bug ada/35886] Bad location of error message
--- Comment #5 from sam at gcc dot gnu dot org 2009-10-03 12:55 --- This has been fixed alreayd in SVN. -- sam at gcc dot gnu dot org changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35886
[Bug ada/35886] Bad location of error message
--- Comment #1 from charlet at gcc dot gnu dot org 2008-05-12 22:34 --- Well, I must be blind, but I do not see a bad location here: GNAT complains at line 3 that the full declaration defined at line 4 must be tagged, showing indeed the line where type T is declared as tagged. Looks correct to me. Arno -- charlet at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35886
[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
[Bug ada/35886] Bad location of error message
--- Comment #3 from charlet at gcc dot gnu dot org 2008-05-12 22:54 --- OK, classifying as an enhancement request, since there's no bug here, the error message is correct. -- charlet at gcc dot gnu dot org changed: What|Removed |Added Severity|minor |enhancement http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35886
[Bug ada/35886] Bad location of error message
--- Comment #4 from sam at gcc dot gnu dot org 2008-05-12 23:01 --- Given that this happens when currently analyzing Id (and not Prev), posting the error message on Prev instead of Id may be an historical typo (inversion between both parameters in the call to Error_Msg_NE). For example, in the message Error_Msg_NE ( full declaration of } must be a record extension, Prev, Id); it seems more logical to print full declaration of type name defined at ... must be a record extension and have the error point to the full view rather than the opposite. And if you look at the way the error message is expanded, you clearly see that type name defined at ... comes together as one sole entity, namely }, so the grouping is full declaration of (type name defined at ...) must be a record extension rather than (full declaration of type name) defined at ... must be a record extension. And the error location (where the error is posted) already gives a primary location which I expect to be the problematic one. So I'm not sure this should be classified as an enhancement request only, as the grouping due to the expansion of } shows an anomaly. Anyway, a trivial patch has been proposed already, waiting for your approval. -- sam at gcc dot gnu dot org changed: What|Removed |Added Severity|enhancement |minor http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35886
[Bug ada/35886] Bad location of error message
-- sam at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2008-04-09 13:27:49 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35886