This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34325] Wrong error message for syntax error
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Dec 2007 03:52:04 -0000
- Subject: [Bug fortran/34325] Wrong error message for syntax error
- References: <bug-34325-14178@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from jvdelisle at gcc dot gnu dot org 2007-12-06 03:52 -------
The error is in gfc_match_if.
There is code that is doing gfc_match_assignment in the IF statement twice to
catch the reported condition. So the invalid code falls through to this and
catches it. The easy way out is to change the wording to be more general, like
"Error in IF clause at 1"
A better implementation would check for a balance of parenthesis in
gfc_match_assignment and throw the specific error. Any opinions on this
Tobias, FX, anyone?
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-12-06 03:52:04
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34325