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 fortran/34325] Wrong error message for syntax error



------- 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


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