On 07/01/2015 10:53 AM, Steve Kargl wrote: > The attached patch special cases unary minus/plus when > gfotran tries to match a function keyword in a mangled > statement. The testcase contains examples, but for > context consider 'c = exp(-a) )' where the final ')' > is erronous. gfortran is trying to match a keyword > such as 'c = exp(x=-a)' so it expects the character > after the '(' to be in [a-z] or '_'. Prior to this > patch, gfortran would do > > % gfc -c sd.f90 > sd.f90:8:13: > > c = exp(-a) ) ! dg-error { "Unclassifiable statement" } > 1 > Error: Invalid character in name at (1) > > with the patch gfortran will instead issue > > % gfc -c sd.f90 > sd.f90:8:4: > > c = exp(-a) ) ! dg-error { "Unclassifiable statement" } > 1 > Error: Unclassifiable statement at (1) > > It can be debated that the new error message isn't much better > than old. I don't care to enter into such a debate, so will > ignore comments complaining the new meesage isn't much of an > improvement over the old. > > Regression tested on trunk. Ok to commit? >
Yes OK. I agree we should not quibble over the error message as long as it is not misleading. Thanks, Jerry