Bug 24404 - Poor Error Description, bad error order
Summary: Poor Error Description, bad error order
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.0.2
: P2 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: diagnostic
Depends on:
Blocks:
 
Reported: 2005-10-17 02:42 UTC by denney
Modified: 2009-04-15 12:32 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-02-01 04:39:49


Attachments
test case that generates the errors (86 bytes, text/plain)
2005-10-17 02:43 UTC, denney
Details

Note You need to log in before you can comment on or make changes to this bug.
Description denney 2005-10-17 02:42:28 UTC
I noticed two things about the error messages for the attached code:
1) The error for line 6 is shown before the error for line 4.  This strikes me as odd, and it doesn't lend itself to easier error squashing.
2) The description for both errors are not very descriptive.  Could something like the line 6 error be changed to "Error: Syntax error ALLOCATE variable must have dimensions", and the line 4 error should indicate that it needs dimensions.

 In file baderrors.f90:6

  allocate(b(5))
           1
Error: Syntax error in ALLOCATE statement at (1)
 In file baderrors.f90:4

  integer*4, allocatable :: b
                            1
Error: Object at (1) may not be ALLOCATABLE
Comment 1 denney 2005-10-17 02:43:08 UTC
Created attachment 10006 [details]
test case that generates the errors
Comment 2 Tobias Schlüter 2005-11-01 19:53:33 UTC
The ordering of errors is hard to tackle, the bad error description is easily fixed on the other hand.
Comment 3 Tobias Schlüter 2005-11-01 20:05:59 UTC
Subject: Bug 24404

Author: tobi
Date: Tue Nov  1 20:05:54 2005
New Revision: 106346

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106346
Log:
	PR fortran/24404
	* resolve.c (resolve_symbol): Output symbol names in more error
	messages, clarify error message.


Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/resolve.c

Comment 4 Tobias Schlüter 2005-11-01 20:14:32 UTC
It remains the ordering of the error messages which in this case is hard to tackle, I'm tempted to say WONTFIX.
Comment 5 Daniel Franke 2009-04-14 15:18:39 UTC
Closing as WONTFIX.
Workaround: use -fmax-errors=1 to get only one message at a time.

See http://gcc.gnu.org/ml/fortran/2009-04/msg00149.html for discussion.
Comment 6 Daniel Franke 2009-04-15 12:32:11 UTC
Closing, see comment #5.