From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id DA8E1385E036 for ; Mon, 31 Jan 2022 14:37:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DA8E1385E036 Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-571-l4jDc-cNPWWbAI2xzpx-vg-1; Mon, 31 Jan 2022 09:37:06 -0500 X-MC-Unique: l4jDc-cNPWWbAI2xzpx-vg-1 Received: by mail-qt1-f197.google.com with SMTP id z1-20020ac87ca1000000b002d11bc8d795so10367503qtv.17 for ; Mon, 31 Jan 2022 06:37:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=hO1b3ffX/ccC9OLpd9Dg6VbX5bwAbzCjM8+fyoBCNwo=; b=HSWFpI3Z7NMPoj/SgyHWh8TW6EsstTPDZM+yIEz2Hy6s81jALrx9VhcRplpeZvAqR1 suWCqAn4/t7920C9bMTq8UwmTcBejGrS0u7mx9dCr44y+4Hs6JE93q+/kdOJnJrFgs/0 6NYMxPCBnhFG7H6YiYZl+W7467aGoULw8h4+no6gdo2wIwBZFcbp9+nYHCxP+/X9HoRX uV/qccmVyEZvLovyJY2gzwSvjoySLY7MKp6ty5J8ztShQHq8vnhTUMLRjpOMsDLsjT2v 2Hf1kwem8OY54Nf9CgbkI1Q8pDeXQwsNwlR+TpiTVRjnBzvYCLZgFecNvz33dO8d8Tsz Nk7Q== X-Gm-Message-State: AOAM533AmJj/zC12CCxBljxxA2xfDnqZgx4qmN3veXu6ay2Eh6gattI1 iH3bXFQmJq6vmMMKSlxkMmdkVXwSla0BFMNY2Z7QhP6wlpRuIHoj8N4HphfZys+IxgSbcTWuf9q FL6QiI7o= X-Received: by 2002:a05:622a:1b8b:: with SMTP id bp11mr14634953qtb.662.1643639826196; Mon, 31 Jan 2022 06:37:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJypLdnROi5le09lO537xHPcADydB6PfKRK6MFWeJJIAxJ5XBBecCOdkUZouuqRWIq68nSyErQ== X-Received: by 2002:a05:622a:1b8b:: with SMTP id bp11mr14634939qtb.662.1643639825941; Mon, 31 Jan 2022 06:37:05 -0800 (PST) Received: from t14s.localdomain (c-73-69-212-193.hsd1.ma.comcast.net. [73.69.212.193]) by smtp.gmail.com with ESMTPSA id t1sm8511470qtc.48.2022.01.31.06.37.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jan 2022 06:37:05 -0800 (PST) Message-ID: <63567678b4b477cab962c021e1970737521eab0d.camel@redhat.com> Subject: Re: Portability requirements of libgccjit++.h From: David Malcolm To: Marc =?ISO-8859-1?Q?Nieper-Wi=DFkirchen?= , Marc =?ISO-8859-1?Q?Nieper-Wi=DFkirchen?= via Jit Date: Mon, 31 Jan 2022 09:37:04 -0500 In-Reply-To: References: User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: jit@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Jit mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jan 2022 14:37:12 -0000 On Mon, 2022-01-31 at 10:39 +0100, Marc Nieper-Wißkirchen via Jit wrote: > The GCC project has the following portability requirements ([1]): > > "The directories gcc, libcpp and fixincludes may use C++03. They may > also > use the long long type if the host C++ compiler supports it. These > directories should use reasonably portable parts of C++03, so that it > is > possible to build GCC with C++ compilers other than GCC itself. If > testing > reveals that reasonably recent versions of non-GCC C++ compilers cannot > compile GCC, then GCC code should be adjusted accordingly. (Avoiding > unusual language constructs helps immensely.) Furthermore, these > directories *should* also be compatible with C++11." I think that page is out of date; as of GCC 11, we're allowing the use of C++11 in gcc's implementation https://gcc.gnu.org/gcc-11/changes.html though I think we're still being somewhat conservative, since we have to be buildable with older compilers. > > Does this requirement apply to libgccjit++.h as well? The header file > is > technically contained in the directory gcc. On the other hand, it is > not > used when building GCC. Yeah - that particular file should probably fall under similar compatibility rules to libstdc++ (though that said, I'm not as familiar with libstdc++ as I probably should be). > > I am asking because I have found the C++11 nullptr keyword in the > header > file.   Good catch. > Can we generally lift the requirements to C++11 as far as the C++ > API for libgccjit is concerned? Good idea. > > As any user of libgccjit has access to a recent C++ compiler (because > with > libgccjit, there comes gcc), I would be very much in favor of lifting > this > requirement so that further developments of the API can use C++11 > features, > including parameter packs generalizing all the ad-hoc overloadings of > new_call in the current header. Sounds good to me. Dave