[patch, fortran] PR27698 - Add diagnostic message for invalid names

Bernhard Fischer rep.nop@aon.at
Thu Jan 4 10:10:00 GMT 2007


On Wed, Jan 03, 2007 at 09:02:50PM -0800, Steve Kargl wrote:
>On Wed, Jan 03, 2007 at 05:50:49PM +0100, Bernhard Fischer wrote:
>> :ADDPATCH fortran:
>> 
>> According to 3.2.1, a name is
>> letter [alphanumeric-character]...
>> 
>> While we did reject invalid names, this PR wanted to have a diagnostic
>> message to be printed along rejecting the invalid name.
>> 
>> The attached patch adds this diagnostic message, adds one testcase to
>> expect the newly added error message and adjusts testcases that trigger
>> the new error.
>> 
>
>Why is do_iterator.f90 trigger the patch?  Is this a illegal code triggering
>the wrong error message?

do_iterator.f90 is illegal code for which an error is thrown ("cannot be
redefined inside loop beginning at") and then a different matcher
(trying 'READ(5,*) I' as a name) is tried.
>
>> A vaguely related issue in the area of invalid names is whether or not
>> -fdollar-ok should allow for the '$' as the very first character in a
>> name ?). Accepting it would mean that implicit types may need to be
>> updated for dollar as first char ?)
>> Attached patch does not address this issue.
>
>IMHO, $ should not be allowed in the 1st position.  But, I'll concede
>that I don't know what the form of this extension is with respect to
>dusty deck code.  

Let's see if somebody needs $ as first character in a name. I'll
follow-up in a separate thread with a patch to the documentation
that clarifies this constraint. Sounds good?



More information about the Gcc-patches mailing list