[Bug fortran/92805] gfortran: blanks within literal constants should not be allowed

anlauf at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Sep 8 19:29:07 GMT 2021


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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anlauf at gcc dot gnu.org

--- Comment #9 from anlauf at gcc dot gnu.org ---
(In reply to Steve Kargl from comment #4)
> Tested.

I tried to resurrect your patch, but it partly misses on the following:

      integer, parameter :: ck = kind ("a")  ! default character kind
      print *, ck_"a"
      print *, ck _"a"
      print *, ck_ "a"
      print *, 1_"a"
      print *, 1 _"a"
      print *, 1_ "a"
      end

pr92805.f90:3:19:

    3 |       print *, ck _"a"
      |                   1
Error: Syntax error in PRINT statement at (1)
pr92805.f90:4:20:

    4 |       print *, ck_ "a"
      |                    1
Error: Syntax error in PRINT statement at (1)

For some reason we detect only some of the syntax violations.


More information about the Gcc-bugs mailing list