This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gfortran] PATCH Fix PR 18537
Steve Kargl wrote:
> 2005-03-07 Steven G. Kargl <kargls@comcast.net>
>
> PR fortran/18537
> * gfortran.h (gfc_option_t): Add warn_tabs member.
> * lang.opt: New option -Wtabs.
> * invoke.texi: document it; Correctly spell FORTRAN as Fortran.
> * options.c (gfc_init_options, gfc_post_options, set_Wall,
> gfc_handle_option): Set it.
> *scanner.c (load_line): Use it
I'm sorry that I didn't think of this earlier, but this will also give a
warning, if a tab is inside a character literal constant, IOW in a string, and
is therefore not ok, as arbitrary characters are allowed there. This warning
can only be issued during parsing, not scanning, once we know whether we're
inside a character context or not.
This is the same problem as for the warning for truncation inside comments, so
maybe their solution can be combined. Unfortunately, moving this warning
later will break it for tabs which are in the first six columns, as they are
expanded in load_line (), so it looks like some reworking is necessary to get
this warning right, and I don't think it's worth it.
- Tobi