| Message ID | aMh/iJmck++chmF3@tucnak |
|---|---|
| State | New |
| Headers |
Return-Path: <gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 259333857823 for <patchwork@sourceware.org>; Mon, 15 Sep 2025 21:05:50 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 455803858C55 for <gcc-patches@gcc.gnu.org>; Mon, 15 Sep 2025 21:05:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 455803858C55 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 455803858C55 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1757970323; cv=none; b=pHeiDcOwLlzulqdR0h/CPyrCv4MA8TsX/cA2WEBLpX8KKYV5VBLJaI70XCWEfAvIIfDHGUnY4cgYqLQ/qP4tURsC0gHh5bzvnI9PQtMLb1khzBfZGSXt0aw1SLo3eRMk2rKa8NcLJciLkbO1jjajvsGts7ElfAkz4rum2ZyG4Yw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1757970323; c=relaxed/simple; bh=BvEawYZBjjQj2Do2kp9G5/Spel5mITNGOq4ZfnNC7LU=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=H7t910HyB3qF+XLBNhJeVyKDegVaP6QVTRgtPqhub13Jymgv1OZACB14UO67BRiNSRXnA5OYwT249cuV3grLZr9zfazFM+keXj305jSXF6vY6d6pzAblBXVo9SW+ZoJrLLDTZN3C3EFI59Ww224KY8dXVDvCAFm6t1Ixtg/jAVU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 455803858C55 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=dHef7SjH DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1757970319; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type; bh=v0079E+MUFtkuvvFajikTAKVlERZxQfT4c9MgRrMzN0=; b=dHef7SjHjwGj4PXokFX+Xk5gbGiw1LvCP3i/9edasH1caBoxCO7pTX8ORdjvD/28Dy+gR7 AWC/VYcEieCWqs7UPHhj2NmjSVTKI7p7La9T7h2xvb5dyYIrh4CoXsMc5cZkILUQMBk5gC HyYDxywGQOsAFDW1bXGpop5ebBcp/kY= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-341-mB7x3D36OKacPeGMIQuqrA-1; Mon, 15 Sep 2025 17:05:17 -0400 X-MC-Unique: mB7x3D36OKacPeGMIQuqrA-1 X-Mimecast-MFC-AGG-ID: mB7x3D36OKacPeGMIQuqrA_1757970316 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8E3241800343 for <gcc-patches@gcc.gnu.org>; Mon, 15 Sep 2025 21:05:16 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.44.32.20]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E6F6C19560A2; Mon, 15 Sep 2025 21:05:15 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 58FL5CRr206933 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 15 Sep 2025 23:05:12 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 58FL5CdT206932; Mon, 15 Sep 2025 23:05:12 +0200 Date: Mon, 15 Sep 2025 23:05:12 +0200 From: Jakub Jelinek <jakub@redhat.com> To: "Joseph S. Myers" <josmyers@redhat.com>, Marek Polacek <polacek@redhat.com> Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] docs: Adjust -Wimplicit-fallthrough= documentation for C23 Message-ID: <aMh/iJmck++chmF3@tucnak> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: rhlsWrSK22TLzhvsDd4XGw0NZxnGYElE0RiugxSUCiI_1757970316 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_HOSTKARMA_W, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS, SPF_NONE, TXREP autolearn=ham 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.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Reply-To: Jakub Jelinek <jakub@redhat.com> Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org |
| Series |
docs: Adjust -Wimplicit-fallthrough= documentation for C23
|
|
Commit Message
Jakub Jelinek
Sept. 15, 2025, 9:05 p.m. UTC
Hi! I've noticed in -Wimplicit-fallthrough= documentation we talk about [[fallthrough]]; for C++17 but don't mention that it is also standard way to suppress the warning for C23. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2025-09-15 Jakub Jelinek <jakub@redhat.com> * doc/invoke.texi (Wimplicit-fallthrough=): Document that also C23 provides a standard way to supress the warning with [[fallthrough]];. Jakub
Comments
On Mon, Sep 15, 2025 at 11:05:12PM +0200, Jakub Jelinek wrote: > Hi! > > I've noticed in -Wimplicit-fallthrough= documentation we talk about > [[fallthrough]]; for C++17 but don't mention that it is also standard > way to suppress the warning for C23. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > 2025-09-15 Jakub Jelinek <jakub@redhat.com> > > * doc/invoke.texi (Wimplicit-fallthrough=): Document that also C23 > provides a standard way to supress the warning with [[fallthrough]];. s/supress/suppress/ > --- gcc/doc/invoke.texi.jj 2025-09-15 11:47:03.435955271 +0200 > +++ gcc/doc/invoke.texi 2025-09-15 16:26:17.085714262 +0200 > @@ -7410,7 +7410,7 @@ switch (cond) > @end group > @end smallexample > > -C++17 provides a standard way to suppress the @option{-Wimplicit-fallthrough} > +C++17 and C23 provides a standard way to suppress the @option{-Wimplicit-fallthrough} I suppose "provide" is better here now that we're talking about multiple languages. Ok if you agree, thanks. > warning using @code{[[fallthrough]];} instead of the GNU attribute. In C++11 > or C++14 users can use @code{[[gnu::fallthrough]];}, which is a GNU extension. > Instead of these attributes, it is also possible to add a fallthrough comment Marek
--- gcc/doc/invoke.texi.jj 2025-09-15 11:47:03.435955271 +0200 +++ gcc/doc/invoke.texi 2025-09-15 16:26:17.085714262 +0200 @@ -7410,7 +7410,7 @@ switch (cond) @end group @end smallexample -C++17 provides a standard way to suppress the @option{-Wimplicit-fallthrough} +C++17 and C23 provides a standard way to suppress the @option{-Wimplicit-fallthrough} warning using @code{[[fallthrough]];} instead of the GNU attribute. In C++11 or C++14 users can use @code{[[gnu::fallthrough]];}, which is a GNU extension. Instead of these attributes, it is also possible to add a fallthrough comment