https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94690

--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Tobias Burnus from comment #2)
> EXPECTED: There is some diagnostic for free-form Fortran and for
> -Wline-truncation also for fixed-form Fortran source form.

That's fixed by the following patch. It is first set to disable tab warnings
but after exceeding the line length, it can be set again.

The too-long line warning itself is taken care of in gfc_next_char_literal,
which also knows about comments, OpenMP etc.

diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c
index f65594f8baa..d1c9379ba88 100644
--- a/gcc/fortran/scanner.c
+++ b/gcc/fortran/scanner.c
@@ -1902,2 +1902,3 @@ load_line (FILE *input, gfc_char_t **pbuf, int *pbuflen,
const int *first_char)
          bool trunc_warn = true;
+         seen_comment = false;

Reply via email to