Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2759202pxb; Sun, 28 Feb 2021 12:17:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJxZYM+S2oDVus2dO0YU/QPa76otR35yaT1es99VZ/5+GUPuHI3O+6Rneb5DesFKcWUH3TFq X-Received: by 2002:a17:906:3088:: with SMTP id 8mr12718063ejv.499.1614543422416; Sun, 28 Feb 2021 12:17:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614543422; cv=none; d=google.com; s=arc-20160816; b=L6hos0CRVKjochCHWz90Yt4z6KYz6VGTvmUCnn0F7Dcpzefap1fLL0Xw30k03rlHZe cPMweRwPMuLnO/wBD4LRi5N7DvIfAcb3SbjjQrJZQQO/efsfZDQoJfWkdZJeU+UASNxb rrt6rr1ojNTryXAjgDQOnE8pFrfQy4+wDB2For+oTw55s+dCtgoCJgU+39Z0xtoR4sxg zy6ZE9Kw7/rH2l7fEMOqDJgrnEaFrw1wtUdMmr65YtMNhyLOmGjVVyN5W4UkOmV9JziY 4F1+5prrsf4lisGg7jfxn2b36DmLGU9larssjtXFaQ78cttNh3kzg1JY95bygQGa5YoT LT/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=0fcxmznsEmcLxGBbW8cWc2lbwaA1/eqUxRmZQ/MkhaM=; b=qdDsZLoocX1winBDRUPioCIlIbIGP2PqzLZpIBs0fKeNEr9UCkGdEVLG2mKqqiiOL3 Vb/Cshm+8UzcVj9fz23FsrFNvzt7huPT+xqfHp+rO+AoYccNG0UFo9QmjcZKYrvJJRob giAHKzFflwBVNEO0BniaXTkCwDlnVSjitH13U0wyOV8moLwjUufHY4xeNLdw7cbwE6jy fWHjpZDWsWYV5blQ2zTCMQLUVDGomWYqJ/r/PPzxbMbreXqpCSOwcLRwr4RxTRE9W1Kz F9JDYWZKjBn3bQmtBrCiXkiv5avKapbxHuS3k6SgQL/0SR99X8V/bJC98tOcax191rZH psmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="dVTI/0oF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p12si9492050edm.494.2021.02.28.12.16.40; Sun, 28 Feb 2021 12:17:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="dVTI/0oF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231392AbhB1UBY (ORCPT + 99 others); Sun, 28 Feb 2021 15:01:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231381AbhB1UBW (ORCPT ); Sun, 28 Feb 2021 15:01:22 -0500 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B8CEC06174A for ; Sun, 28 Feb 2021 12:00:41 -0800 (PST) Received: by mail-lf1-x130.google.com with SMTP id d3so22019321lfg.10 for ; Sun, 28 Feb 2021 12:00:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0fcxmznsEmcLxGBbW8cWc2lbwaA1/eqUxRmZQ/MkhaM=; b=dVTI/0oFaQfcowiF91H3OWQLFKuOaYt1Tpw+fVNyC32xb4OSnfyiVjTkCYepoi56j1 KiISP1eU7G1330E0O6ENAV+rXwb0oLRA6iLLDOT0H+YiXIXtKvXQ9XCeJGItJRZuXnO3 KMaNsZ1chmXi+ZDhNQ4hQczbnVsN+s1iCb7dk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0fcxmznsEmcLxGBbW8cWc2lbwaA1/eqUxRmZQ/MkhaM=; b=a4F78XRmldOOeQ9S0zLIMMbRSuWiRPOhzDyYyedSsEj9hIITEm5btFOQHn2TRjxRGA m6r7hIEaGEdtFhtmb70sYGo01Ms1ZzMw4S2jDvjjFIIp7BJyiXFfJvIfnKiBZzfw0TK9 JB5m+vHrud5Y+bN9dXYs/xtTL7YkDpUNJH/932tRf6y2Gpk+yNyY7g+b3XCrIyIlC8SU /E0HZlrRKLuP2XAxepqWa4uTlSEwU4rRTDvIAkxviVMZPNTA+xurbzSUoUCCc52Zow6W pUjvaHFV05DsSZWWZIyEn/elUPIV3DXh+bIOoeZwxaxGz2hngfgjbx+Y734WKGrrKRAh ozfg== X-Gm-Message-State: AOAM531t4bmpMYtkIhQPzgR9m7q5Syn8DoArCbRHuCeQYGjAIl2aHSMD sZ+cN4N8E1CQPM5v88WXij+V4Q3yYpnuwg== X-Received: by 2002:ac2:544f:: with SMTP id d15mr7191251lfn.177.1614542439750; Sun, 28 Feb 2021 12:00:39 -0800 (PST) Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com. [209.85.167.48]) by smtp.gmail.com with ESMTPSA id b11sm2064006lfi.174.2021.02.28.12.00.38 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 28 Feb 2021 12:00:38 -0800 (PST) Received: by mail-lf1-f48.google.com with SMTP id z11so22008765lfb.9 for ; Sun, 28 Feb 2021 12:00:38 -0800 (PST) X-Received: by 2002:a05:6512:2287:: with SMTP id f7mr7223200lfu.40.1614542437955; Sun, 28 Feb 2021 12:00:37 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Sun, 28 Feb 2021 12:00:22 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 00/11] pragma once: treewide conversion To: Alexey Dobriyan Cc: Luc Van Oostenryck , Linux Kernel Mailing List , Andrew Morton , Sparse Mailing-list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 28, 2021 at 11:34 AM Alexey Dobriyan wrote: > > > > > End result: #pragma is fundamentally less reliable than the > > traditional #ifdef guard. The #ifdef guard works fine even if you > > re-read the file for whatever reason, while #pragma relies on some > > kind of magical behavior. You continue to not even answer this very fundamental question. "#pragma once" doesn't seem to have a _single_ actual real advantage. Everybody already does the optimization of not even opening - much less reading and re-parsing - headers that have the traditional #ifdef guard. And even if you _don't_ do that optimization, the #ifdef guard fundmentally semantically guarantyees the right behavior. So the #ifdef guard is (a) standard (b) simple (c) reliable (d) traditional and you have yet to explain a _single_ advantage of "#pragma once". Why add this incredible churn that has no upside? So no. We're not using #pragma once unless y9ou can come up with some very strong argument for it And no, having to come up with a name for the #ifdef guard is not a strong argument. It's simply not that complicated. Linus