From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 544FD3940CE2; Fri, 20 Mar 2020 01:12:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 544FD3940CE2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1584666738; bh=+AmTP/5k3K7CsyQI+xlst8sJO9Arzr6yZSaaRdyEWqA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=WuAhBmYluTBXaOXgyqfjCcqWykjDRwUNWs89TcEfhni6OgklrmZz1Sjfp/Ha8pVs7 jsMg3CSSgvfiuR+z/k/oboZQuk6M/SCyv2x9q5LXXahZNTYHEZtv0jdofZBDatro/W OMEDm6Hz4o9JfDJE0qcqtYGiSLHiwOjoP7wukeSg= From: "sgk at troutmask dot apl.washington.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/94228] Preprocessor inconsistency for macros when invoked from gfortran Date: Fri, 20 Mar 2020 01:12:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 9.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sgk at troutmask dot apl.washington.edu X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Mar 2020 01:12:18 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94228 --- Comment #5 from Steve Kargl -= -- On Thu, Mar 19, 2020 at 10:24:10PM +0000, markwayne1969 at gmail dot com wr= ote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94228 >=20 > --- Comment #4 from Mark Paris --- > (In reply to kargl from comment #3) > > No. Newer C, as opposed to older C, uses // for a comment. > > Fortran uses // as the concatenation operator. Run this > > through a cpp pre-processor. > >=20 > > character(len=3D80) :: name =3D 'john ' // 'Doe' > > print *, name > > end > >=20 > > ~/work/bin/cpp a.F > > # 1 "a.F" > > # 1 "" > > # 1 "" > > # 1 "a.F" > > character(len=3D80) :: name =3D 'john ' > > print *, name > > end >=20 > Thank you for your kind reply. I understand that this is an issue of disparate use of the same operator, '//' in C and Fortran. >=20 > Is it possible to have cpp recognize the different uses of // by, > say, the file name extension of the source being processed? Sure. Anything is possible if someone puts in the time to write a Fortran specific preprocessor. AFAIK, none of the current diminishing number of gfortran contributors is=20 working a new preprocessor.=20=20 > Links to information about gcc development for this specific > possible feature would be appreciated. I don't know of any gfortran preprocessor projects. You are=20 more then welcomed to clone the git repository and start such a project. Having new gfortran contributors would be healthy for gfortran's future.=