[Bug fortran/95146] gfortran -cpp – leading spaces before '#' preprocessing directive not handled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95146 --- Comment #6 from Tobias Burnus --- (In reply to Thomas Koenig from comment #5) > Moving to the non-traditional C preprocessor will cause havoc with > the // operator in Fortran. > c = 'a' // 'b' would then be turned into c = 'a', probably not intended :-) That's one of the reasons that PR 28662 is still pending; it requires a special Fortran mode for libcpp. — See PR 28662 comment 4 to 10. – Still useful, but not trivial.
[Bug fortran/95146] gfortran -cpp – leading spaces before '#' preprocessing directive not handled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95146 Thomas Koenig changed: What|Removed |Added CC||tkoenig at gcc dot gnu.org --- Comment #5 from Thomas Koenig --- Moving to the non-traditional C preprocessor will cause havoc with the // operator in Fortran. c = 'a' // 'b' would then be turned into c = 'a', probably not intended :-)
[Bug fortran/95146] gfortran -cpp – leading spaces before '#' preprocessing directive not handled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95146 Tobias Burnus changed: What|Removed |Added Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #4 from Tobias Burnus --- (In reply to Andrew Pinski from comment #2) > Pre ANSI/ISO C (aka K&R C), preprocessor were true preprocessor and always > required # in the first column. > > I think meson should be fixed really to work rather than working around the > issue in gfortran. Well, gfortran should finally move to non-traditional, but that's not that trivial as PR 28662 shows. → Close as INVALID as the current behavior is fine with -traditional and the other is already covered.
[Bug fortran/95146] gfortran -cpp – leading spaces before '#' preprocessing directive not handled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95146 --- Comment #3 from Andrew Pinski --- (In reply to Andrew Pinski from comment #2) > Pre ANSI/ISO C (aka K&R C), preprocessor were true preprocessor and always > required # in the first column. > > I think meson should be fixed really to work rather than working around the > issue in gfortran. Actually it was already fixed: https://github.com/mesonbuild/meson/issues/7017
[Bug fortran/95146] gfortran -cpp – leading spaces before '#' preprocessing directive not handled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95146 --- Comment #2 from Andrew Pinski --- Pre ANSI/ISO C (aka K&R C), preprocessor were true preprocessor and always required # in the first column. I think meson should be fixed really to work rather than working around the issue in gfortran.
[Bug fortran/95146] gfortran -cpp – leading spaces before '#' preprocessing directive not handled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95146 --- Comment #1 from Tobias Burnus --- This seems to be a side effect of using -traditional in gfortran see PR 28662 for moving to no traditional. Also gcc -E -traditional shows this behavior of just echoing the strings.