This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/84161] New: preprocessor should discard Fortran comments
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 01 Feb 2018 08:19:39 +0000
- Subject: [Bug preprocessor/84161] New: preprocessor should discard Fortran comments
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84161
Bug ID: 84161
Summary: preprocessor should discard Fortran comments
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: preprocessor
Assignee: unassigned at gcc dot gnu.org
Reporter: janus at gcc dot gnu.org
Target Milestone: ---
Consider this Fortran test case:
#define _ASSERT_(a, b) if (.not. (a)) print *, b
program preproc_test
! _ASSERT_() is a nice macro :)
end
Putting this into an .F90 file and compiling with gfortran results in this
error:
! _ASSERT_() is a nice macro :)
Error: macro "_ASSERT_" requires 2 arguments, but only 1 given
The GCC preprocessor apparently ignores comments by default (at least with
C/C++, as documented in
https://gcc.gnu.org/onlinedocs/gfortran/Preprocessing-Options.html), so this
should also work with Fortran.