Received: by 2002:a17:907:8744:b0:9bd:85f7:2662 with SMTP id qo4csp1330326ejc; Fri, 13 Oct 2023 00:49:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEGC0NF7mhxbzDf4EQE2I7Isk4UokAl551esriVA8wjj0q8Kh+v/S6tCNeSWoS8B/kPo5fW X-Received: by 2002:a05:6214:2a4a:b0:66d:27ac:a595 with SMTP id jf10-20020a0562142a4a00b0066d27aca595mr969897qvb.23.1697183385694; Fri, 13 Oct 2023 00:49:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697183385; cv=none; d=google.com; s=arc-20160816; b=Hdxaj6KKOlFm3uLrJmVcMxnxtxjBQtmhfFxW4nTGVjiMc/4smakQZvw0fices2nQQD 13pxXti3defgFSJBoZuAsY0pmlkbZYTo8Dh/ezx4wx+TIMhTOKDoKH2Q8ffR/A3IuzrG D7Blbq8Ckrrr/B6K1G9ZC9nX+kTO0X1dacRNxv5HTsITsD2/qSCb70WQlcb92+Kqkd/R OqAedlDK6IUul0lZHpJpmR8MK7QHMFpi/2HpWMj3lYZ3j4DW0AyBlu1VK8diA43wt1Gx R7Fy9JD8y1pIwfeEI7t8X1tWOCtPwvS/kwQwnYXDGS2Bxp3mOqu/ooWWQPjP/lX44VX8 5fCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=ZMWm7PYeA94VivoVKWT0oooHMlaYiSocgiFxO0wxv54=; fh=+ZsZUTuyxoQ5ZtM1/3hdknpz4V7RB/CRpE4IdMKqcXk=; b=p5J2ccOPSOeeQ3eIrLtQGY2xmXED3Kzm8ZhZk5OXyTUj1ukE67qoAcq4TPHWzvDFix rF9bsqA54kQAfZPjwgIRI7fFxslCpZacVPGIw1MMkoDTyY+1BThFJ1lGA8xiBesmikmK cYjAkxxNrKJo1ukTy/gz/FCnnCCmkBvW3UEEaiS+heZG+/9I9lKXaflZp1JeotMQphJF zh7aYF7Th4BOU4VYjYRLI990LW2mDLJgKw7wHKURQdfdhIGWmy9lRReMWJEED6xhpOhG uCVfUUkYAoDjSwcKG+bPrgM8MhjxfS32sBo/wwJ8br7F7qe7lkhjZcJ8k+oOJtQk6lIz dIPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QkyAmzX8; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t11-20020a05620a450b00b00773c792bdcesi805021qkp.545.2023.10.13.00.49.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Oct 2023 00:49:45 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QkyAmzX8; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qrCvP-000483-FH; Fri, 13 Oct 2023 03:49:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qrCvN-00047g-Qo for qemu-arm@nongnu.org; Fri, 13 Oct 2023 03:49:33 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qrCvL-000429-6G for qemu-arm@nongnu.org; Fri, 13 Oct 2023 03:49:33 -0400 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-32c9f2ce71aso1490027f8f.1 for ; Fri, 13 Oct 2023 00:49:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697183369; x=1697788169; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ZMWm7PYeA94VivoVKWT0oooHMlaYiSocgiFxO0wxv54=; b=QkyAmzX8vNZygBKWvmRBpVmPwlIYbsvd/9h69hBNyDkqTtUBc4GupHlATyf6LD/Etn Ati9tODuC2oOuGlcAKPZ3WyhJr98uaF/0OubMl/7Qc/Z4ZI3Qz7uVjbGuRhnYr5WBepn 04HXbO04Z7CEwFrDlGTClpPzIlnmPSeNm6TKKsr8eFSim9zp4gwevxK4lCi9568rCoAJ 6PnaKkn9cM4ZFyqIX8uQD+ANJkCboME5iEBY5hDfwz7QYxOWukOaxtGn264J7fFzDwuL /Nyk9jUCDPI3OOYbEE9rPcv/jPk+8oLye5JwqVd8Mi+elBuw4g0yFfHQlRes5NGaorXl 865Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697183369; x=1697788169; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZMWm7PYeA94VivoVKWT0oooHMlaYiSocgiFxO0wxv54=; b=N2ndW2rqBHaE2anh+OEqw5fuhBHdnSfQvA6A/zmTKnaXg0WeRnyXo1zbt3WWMGI8EM 3jt5hssFmUGh+93GeXdXXsLHPIm3CmS3vSE3VIHWS/04ACn3/lDvf2UowacMu8CVESdF JIMySjdiShLPOeDilc55+K7y+N9yp0dN8wVNRSymqFxL720j0sN4zM2e68fsG1TqSmjf KQGnjlZ2Jq1g58hJDdO5RAN6+gjUu4cOawAYUgfkgsYP8hNrX3A+Re6Oowb2CO8FSPoU Gatk+H9ZXack5hDKgbgvcs/gehJgaVBW4D5ca6MgIL8RqeZPwkjXQyRS5WfgGJ9U02U7 G3fw== X-Gm-Message-State: AOJu0YxKjmjTc87U3dTbR702I2nG8+uIhPJ2CuwwxM3dpHd35JeqhYuW xWe6IoV5MMG8lyn1R/BrKSXe8Q== X-Received: by 2002:a5d:4fcf:0:b0:31f:f99c:6013 with SMTP id h15-20020a5d4fcf000000b0031ff99c6013mr20885228wrw.61.1697183369326; Fri, 13 Oct 2023 00:49:29 -0700 (PDT) Received: from localhost.localdomain (adsl-170.109.242.226.tellas.gr. [109.242.226.170]) by smtp.gmail.com with ESMTPSA id m8-20020adfa3c8000000b0032d7fde2d3csm7990663wrb.79.2023.10.13.00.49.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 00:49:28 -0700 (PDT) From: Emmanouil Pitsidianakis To: qemu-devel@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org Cc: Emmanouil Pitsidianakis Subject: [RFC PATCH 00/78] Strict disable implicit fallthrough Date: Fri, 13 Oct 2023 10:47:04 +0300 Message-Id: X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=manos.pitsidianakis@linaro.org; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org X-TUID: AEDrE4Y8JZjp Hello, This RFC is inspired by the kernel's move to -Wimplicit-fallthrough=3 back in 2019.[0] We take one step (or two) further by increasing it to 5 which rejects fall through comments and requires an attribute statement. [0]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a035d552a93b The line differences are not many, but they spread all over different subsystems, architectures and devices. An attempt has been made to split them in cohesive patches to aid post-RFC review. Part of the RFC is to determine whether these patch divisions needs improvement. Main questions this RFC poses ============================= - Is this change desirable and net-positive. - Should the `fallthrough;` pseudo-keyword be defined like in the Linux kernel, or use glib's G_GNUC_FALLTHROUGH, or keep the already existing QEMU_FALLTHROUGH macro. - Should fallthrough comments be removed if they do not include extra information. Some external resources ======================= See the RFC discussion in the kernel: https://lore.kernel.org/lkml/1d2830aadbe9d8151728a7df5b88528fc72a0095.1564549413.git.joe@perches.com/ The `fallthrough;` pseudo-keyword in the kernel source code: https://elixir.bootlin.com/linux/latest/C/ident/fallthrough In summary, I quote the doc comment and definition: /* * Add the pseudo keyword 'fallthrough' so case statement blocks * must end with any of these keywords: * break; * fallthrough; * continue; * goto