This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gfortran] PATCH Fix PR 18537
On Sat, Mar 12, 2005 at 04:46:22PM +0100, Tobias Schl?ter wrote:
> - if no additional options are given, we deal with tabs as-is. I.e. accept
> tabs everywhere and treat them as synonymous to blanks, except in the first
> six columns of a fixed-form source file, where they skip to column 7, and
> in character-literal-constants, where they're translated to something like
> ACHAR(9)
This is the status quo and the default behavior of my original patch
and my modified patch.
> - if -Wall is used, we warn for tabs that are used outside of comments
I have updated by original patch to have a -Wtabs option. It will
produce a warning for all tabs that occur anywhere in the file
(ie., including comments and character-literal-constants). This
option is not turned on by -Wall or by -std=f95. You must explicitly
ask for this option by name.
> - if -std=f95 is used we issue an error, if a tab is used in a place where a
> blank is required, IOW we treat it as a graphic character. Declaring it a
> control character would be contrary to the principle of least surprise,
> according to which I would expect the compiler to accept tabs in comments or
> character-literal-constants.
I have modified the patch to deal with tabs in the -std=f95 situation:
* a tab in a comment is ignored.
* a tab in a character-literal-constant is ignored.
* a tab used where a member of the Fortran character set is expected
will issue an error.
--
Steve