[Bug fortran/104812] Construct-name with same variable name in scope
fruitclover at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Apr 5 15:25:58 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104812
--- Comment #4 from Mike K. <fruitclover at gmail dot com> ---
Created attachment 52749
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52749&action=edit
propose to return an error if constuct-name clashes with variable name
> Note, the prohibition in the standard is not a numbered
> constraint, which means a compiler need not issue an
> error or warning. It is expected that the programmer
> writes conforming code.
Could we enforce this constraint and print error message instead of relying on
programmer? I think that explicit error is better than silently accepting
non-conforming code for some corner-cases.
Attached patch with proposed fix, wdyth?
More information about the Gcc-bugs
mailing list