[flang-dev] [EXTERNAL] Re: Adding a predefined preprocessor symbol __FLANG.

Steve Scalpone via flang-dev flang-dev at lists.llvm.org
Mon Aug 3 17:14:13 PDT 2020


+1

From: flang-dev <flang-dev-bounces at lists.llvm.org> on behalf of flang-dev <flang-dev at lists.llvm.org>
Reply-To: "Perry-Holby, Alexis" <aperry at lanl.gov>
Date: Monday, August 3, 2020 at 4:08 PM
To: flang-dev <flang-dev at lists.llvm.org>
Subject: Re: [flang-dev] [EXTERNAL] Re: Adding a predefined preprocessor symbol __FLANG.

External email: Use caution opening links or attachments

Sounds good to me.  I believe this mimics the clang way of doing things, and it’s generally good to match style across LLVM projects.

Alexis Perry-Holby
Los Alamos National Laboratory
Applied Computer Science (CCS-7)

From: flang-dev <flang-dev-bounces at lists.llvm.org> on behalf of Richard Barton via flang-dev <flang-dev at lists.llvm.org>
Reply-To: Richard Barton <Richard.Barton at arm.com>
Date: Thursday, July 30, 2020 at 1:18 AM
To: Stephen Scalpone <sscalpone at nvidia.com>, "flang-dev at lists.llvm.org" <flang-dev at lists.llvm.org>
Subject: [EXTERNAL] Re: [flang-dev] Adding a predefined preprocessor symbol __FLANG.

Hi all

FYI - I have proposed that we make a clean break and treat LLVM Flang as a distinct new compiler from Classic Flang rather than as just a different version of Classic Flang.

I am proposing that LLVM Flang define:

#define __flang__            1
#define __flang_major__      "@LLVM_VERSION_MAJOR@"
#define __flang_minor__      "@LLVM_VERSION_MINOR@"
#define __flang_patchlevel__ "@LLVM_VERSION_PATCH@"
#define __flang_version__    "@LLVM_VERSION_MAJOR at .@LLVM_VERSION_MINOR at .@LLVM_VERSION_PATCH@"

rather than __FLANG.. (all caps) macros and remove __F18… macros.

Does anyone see an issue with this?

Ta
Rich

From: flang-dev <flang-dev-bounces at lists.llvm.org> On Behalf Of Steve Scalpone via flang-dev
Sent: 23 July, 2020 01:01
To: flang-dev at lists.llvm.org
Subject: [flang-dev] Adding a predefined preprocessor symbol __FLANG.

Vendors and users of classic flang may be interested in https://reviews.llvm.org/D84334, which proposes replacing  the predefined preprocessor macro __F18 with __FLANG. Classic flang also defines __FLANG.

As proposed, conditionally compiled code will not be able to distinguish one flang compiler from the other.

If you have an opinion, please contribute to the review.

- Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/flang-dev/attachments/20200804/55e6869a/attachment-0001.html>


More information about the flang-dev mailing list