From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 302613856DF7 for ; Wed, 25 May 2022 18:19:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 302613856DF7 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.91,250,1647331200"; d="scan'208";a="76380351" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 25 May 2022 10:18:59 -0800 IronPort-SDR: AnpQ6gIySln5k8PgHhbWkdLIQsO0e6WXpxne0NvfvvxhjR2R27R7l8MfYh9Yci9QyMUhMvE5Sj NMQXx126teANIdR9nUHgFJCCX1C3KGjYCxCWmf1JSVKNCjF/bMBhdYqzh5LxuKrGlbm3UB+XWh vWiYKSty4cGuGaaFKAtZSqvnN9NJb3Y5E9/VO0/XfSosn/lO8GMszbehkNDcT9nalA1fAo6Czv bAfLMOhOqhbj1u9FZwIiqSCv7ydLHEc80YjkE3cUi2cDf7b536hRzB3jS96Ssa219Hd67M1y1h 588= Date: Wed, 25 May 2022 18:18:48 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Marek Polacek CC: GCC Patches Subject: Re: [wwwdocs] Add C status page In-Reply-To: Message-ID: References: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-15.mgc.mentorg.com (139.181.222.15) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3113.2 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2022 18:19:02 -0000 On Tue, 24 May 2022, Marek Polacek via Gcc-patches wrote: > > And cases where some support in GCC should > > definitely be done to consider the feature implemented, even when not > > needed for conformance (e.g. the %wN, %wfN printf/scanf formats need > > implementing in glibc, and corresponding format checking support needs > > implementing in GCC). > > These could be marked as "partially implemented" (yellow color). Except > I often don't know which features need extensions like that. I think something like how c99status.html lists wide character library support is appropriate for the Notes (so along the lines of "Library feature, no compiler support required. GCC doesn't have %wN, %wfN format checking support."). > > There are also cases where a feature is > > substantially there but a more detailed review should be done for how it > > matches up to the standard version (e.g. the DFP support based on TR > > 24732-2009 could do with such a detailed review for how it matches C2x > > requirements). > > Indeed, and that's a hard problem. I for one could never figure out this > one. So I'd leave it in the "?" (red color) state. I think the approach taken in c99status.html - list the version where there is substantial support so code written with the new syntax will generally work - is appropriate as regards the choice of version number to list. So that would list GCC 4.3 as the version with DFP support (i.e. the entry for TS 18661-2 integration - I don't think listing all the TS 18661 parts in a single row is right). And then it might be marked as partially implemented. And the Notes would say (in some order) that (a) support based on TR 24732-2009 may not have been fully updated to C2X requirements, (b) both language and library features are involved, and library support is in libdfp (link to libdfp) but might not be complete, (c) there are issues with correct rounding of conversions between binary and decimal DFP in some cases (link to bugs 97635, 105669), and issues with exceptions and rounding modes similar to those that apply with binary floating point, (d) DFP is only supported for a few architectures. (I don't think the versions in which I made -std=c2x -pedantic allow DFP features need to be mentioned at all.) > > > + > > > + Binary literals > > > + N2549 > > > + GCC 11 > > > + > > > + > > > > This is an example of cases where the version where a feature was > > supported in GCC as an extension is long before the version where > > -pedantic knows about it being supported in a given standard version; > > listing the version with the -pedantic change in such cases may not be > > very helpful without noting when it was originally implemented. > > Probably here we could just say "Yes" (green color) and make a note in the > "Notes" column. Following the same principle as c99status.html for chosing versions to list says that the version number should be listed as GCC 4.3. > > There are > > probably other examples in the list. (There are also examples where GCC > > supports the feature but hasn't yet had -pedantic updated accordingly, > > e.g. #warning. And cases where it's largely supported but there are small > > differences in the standard version that still need implementing, e.g. > > typeof.) > > Yeah, I bet. It's tricky to decide :/. (In the case of typeof, "partially implemented" is probably right anyway, simply because of the remove_quals variant in C2x (for which there is a proposal of renaming to be considered in July). And then note that typeof itself, with some semantic differences, but not remove_quals, was implemented in GCC 1.21 or before - similar to how c99status.html handles complex numbers, noting that __complex__ was supported in GCC 2.5 but _Complex not until GCC 3.0 which is the version listed in the version column there.) > Maybe it's just me, but I find some value in having proposals like that in > the table too (but it should be "N/A" and gray). This is what I did for > N2641. > > What I like about having a table like this is that it makes it clear what > remains to be implemented, and unimplemented features have a linked PR, > which makes it easy to see if someone is already planning to implement the > feature, or if it still unassigned. I don't object to having non-features listed as N/A, but I think you'll have a lot of rows like that. Library features (that don't need compiler support) should be explicitly noted as such when marking them as N/A. I have rough notes on C2x features needing implementing in GCC and glibc (sorted approximately by the relevant commits in the (private) C standard git repository), but that isn't a straightforward checklist intended to be more widely comprehensible or to map to corresponding PRs, includes cases of possible future improvements not actually needed to consider a feature implemented, and doesn't distinguish whether something needs implementing in GCC, glibc or both. -- Joseph S. Myers joseph@codesourcery.com