From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 406CBC433DB for ; Fri, 15 Jan 2021 21:34:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F3E93239E5 for ; Fri, 15 Jan 2021 21:34:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726301AbhAOVd7 (ORCPT ); Fri, 15 Jan 2021 16:33:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725933AbhAOVd6 (ORCPT ); Fri, 15 Jan 2021 16:33:58 -0500 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8700DC061757 for ; Fri, 15 Jan 2021 13:33:18 -0800 (PST) Received: by mail-lf1-x135.google.com with SMTP id u25so15288770lfc.2 for ; Fri, 15 Jan 2021 13:33:18 -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=BQxUP24hpiBqEtJYhYwHk6U8ZAm2WakN0TBfaYLNdRc=; b=UwkikTy66sWmdnraVWEJ+LlzCNJYBCKbswTcMKOsHurlf1pkecqJjGDUv8bqcK2d1h x0Xtu+z3jgU8oB3RtulGryrnGgO1d4IxAVK+rusX5EUub8DSi2y8MoQmAHvHu+ai3IG0 E6lROXLPXv4yp3z0MlDnv1aLo+5QU1+6Z+sCE= 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=BQxUP24hpiBqEtJYhYwHk6U8ZAm2WakN0TBfaYLNdRc=; b=HggjzwqNGauDsVL5PUamCFyGxK1VV2IFurie8VY9jTyd88TsCGPIOYAKFyQ4byG/bG TPUsFFH3caBjuLfwXc4WLMueoKQozvqbs9ZiSYRTyxq64tQe3IbrPfYlQAH9cU5oNb2T CS4aewCu7+L+vd9RqGg3l2YF7VDqpq1jJM7alJ6GZ2T5cdP4atAHl3LDr3QbdCNs3Xe7 ljWTXI8zr8jiH7RDkRmbCA268NVjEWDCojCllstgZ7DwqKFUga5FJ1FK04fdmuYhP+1S idOS6lFKzH2fBN7TXJGlZsL847Td4efcnK2rw/j2dXJ5XFx41Sa/BltH7E6E5u+JTEgI KDtQ== X-Gm-Message-State: AOAM532Od+02e19DV2iegiRIni9fNb6n11LTgdAHMV0YzZiaRmNnZfvq fFRVWbBtGcp21s+9zyWzr/pvjc6MMs/+Lw== X-Google-Smtp-Source: ABdhPJwfoPzskVEyPENBNMn+LnLR2QU2hnp7MDf3GJqgFzBDLaDiWEQtXyCMuhYjeTbxmm4nfcBVjg== X-Received: by 2002:ac2:51ab:: with SMTP id f11mr6907101lfk.510.1610746396206; Fri, 15 Jan 2021 13:33:16 -0800 (PST) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com. [209.85.167.50]) by smtp.gmail.com with ESMTPSA id e6sm1028948lfc.23.2021.01.15.13.33.13 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Jan 2021 13:33:14 -0800 (PST) Received: by mail-lf1-f50.google.com with SMTP id o10so15232867lfl.13 for ; Fri, 15 Jan 2021 13:33:13 -0800 (PST) X-Received: by 2002:a05:6512:789:: with SMTP id x9mr6054405lfr.487.1610746393145; Fri, 15 Jan 2021 13:33:13 -0800 (PST) MIME-Version: 1.0 References: <20210114175934.13070-1-will@kernel.org> <20210114175934.13070-5-will@kernel.org> <20210114190021.GB13135@willie-the-truck> <20210114194129.GA13314@willie-the-truck> <20210115092313.GA13700@willie-the-truck> In-Reply-To: <20210115092313.GA13700@willie-the-truck> From: Linus Torvalds Date: Fri, 15 Jan 2021 13:32:57 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 4/8] mm: Separate fault info out of 'struct vm_fault' To: Will Deacon Cc: Nick Desaulniers , Linux Kernel Mailing List , Linux-MM , Linux ARM , Catalin Marinas , Jan Kara , Minchan Kim , Andrew Morton , "Kirill A . Shutemov" , Vinayak Menon , Hugh Dickins , Android Kernel Team Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 15, 2021 at 1:23 AM Will Deacon wrote: > > Hmm. The feedback on the clang bug suggests that GCC is the one in the > wrong here (although the argument is based on C11 and I haven't trawled > through the standards to see how this has evolved): Oh well. That writing is absolutely the _worst_ kind of weaselwording standards language reading, trying to make excuses for bad behavior by basically depending on "this language is unclear", and trying to say that the buggy behavior is required by C11. What a disappointment. Absolutely nothing in the quoted C11 language says to me what that bug entry claims it says. The argument seems to hinge on "The members of an anonymous structure or union are considered to be members of the containing structure or union" and then it makes the completely uncalled-for leap that that means that because it was "int" in the const struct, it must be "int" in the containing structure too. Which is complete BS, and doesn't follow logically _or_ grammatically. It would be a "member of the containing structure" even with the "const" qualifier, so the argument they make is just inane. In fact, the _other_ sentence they quote clearly points to this being just a clang bug: "A modifiable lvalue is [...] if it is a structure or union, does not have any member (including, recursively, any member or element of all contained aggregates or unions) with a const- qualified type" and clearly this recursively is an element with a const-qualified recursive struct. Whatever. It's one of those "read the documentation squint-eyed to avoid doing the right thing" arguments. It's not worth arguing with people like that, and let's just ignore the clang bug here. Linus From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0DDEC433DB for ; Fri, 15 Jan 2021 21:33:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 71946239ED for ; Fri, 15 Jan 2021 21:33:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 71946239ED Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C2E6C8D01F0; Fri, 15 Jan 2021 16:33:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BB81B8D01EC; Fri, 15 Jan 2021 16:33:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A7F378D01F0; Fri, 15 Jan 2021 16:33:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0205.hostedemail.com [216.40.44.205]) by kanga.kvack.org (Postfix) with ESMTP id 8E9618D01EC for ; Fri, 15 Jan 2021 16:33:18 -0500 (EST) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 5477F18518F0C for ; Fri, 15 Jan 2021 21:33:18 +0000 (UTC) X-FDA: 77709310476.12.bath82_0f1423c27532 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin12.hostedemail.com (Postfix) with ESMTP id 4317C182E2F60 for ; Fri, 15 Jan 2021 21:33:18 +0000 (UTC) X-HE-Tag: bath82_0f1423c27532 X-Filterd-Recvd-Size: 5724 Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) by imf05.hostedemail.com (Postfix) with ESMTP for ; Fri, 15 Jan 2021 21:33:17 +0000 (UTC) Received: by mail-lf1-f50.google.com with SMTP id m25so15241504lfc.11 for ; Fri, 15 Jan 2021 13:33:17 -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=BQxUP24hpiBqEtJYhYwHk6U8ZAm2WakN0TBfaYLNdRc=; b=UwkikTy66sWmdnraVWEJ+LlzCNJYBCKbswTcMKOsHurlf1pkecqJjGDUv8bqcK2d1h x0Xtu+z3jgU8oB3RtulGryrnGgO1d4IxAVK+rusX5EUub8DSi2y8MoQmAHvHu+ai3IG0 E6lROXLPXv4yp3z0MlDnv1aLo+5QU1+6Z+sCE= 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=BQxUP24hpiBqEtJYhYwHk6U8ZAm2WakN0TBfaYLNdRc=; b=pEqPXk39lQN7nw/Uibd6T7Z7MHYDW4qRWj8vMe0fZR+piL/ZCAgQZ2TsRMt1g7G9b2 Mzb++goQPjIWnlf2PDJ5Vh2KTBtdFxC9G6IeDqTC5bZyqkOl5SGw9oJf1dvWbyFCRn64 W4lDrSnRe0bcVH8Xs7TepEU+D3KR68+BNLEup1eb7x121IQhscDEempythKopHXKKO7x +QwgMV3saA5aTDUR8Cfr/Ju/NB0CzVPDb4c85q+WEJm5ed88QFd4BycASKVKIwsXiB/s DyFTQ/yOas0/1xFfowDsgHdabs+DRdDDey3jcwXQ1wpB2DQtbOsfCsL1vtccw3oyXmyu H6dA== X-Gm-Message-State: AOAM530I6hZ2DIr6aPN74hWNwXpEHjCtS+vgBybgn5vo+b/lh7wJPmLI xKQre7JDO/6Eo+4ib07lhNKsyIwgeuEUNg== X-Google-Smtp-Source: ABdhPJy9TP755+fwkq4/qp1fsQW9erPe0w5psLOsKHbdzJzYgAjrjv+tlM4FaKZS88Mqkb6i6Ggwmw== X-Received: by 2002:a19:6a1a:: with SMTP id u26mr6252590lfu.497.1610746395757; Fri, 15 Jan 2021 13:33:15 -0800 (PST) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com. [209.85.167.43]) by smtp.gmail.com with ESMTPSA id n22sm1031752lfq.191.2021.01.15.13.33.13 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Jan 2021 13:33:13 -0800 (PST) Received: by mail-lf1-f43.google.com with SMTP id v24so8625564lfr.7 for ; Fri, 15 Jan 2021 13:33:13 -0800 (PST) X-Received: by 2002:a05:6512:789:: with SMTP id x9mr6054405lfr.487.1610746393145; Fri, 15 Jan 2021 13:33:13 -0800 (PST) MIME-Version: 1.0 References: <20210114175934.13070-1-will@kernel.org> <20210114175934.13070-5-will@kernel.org> <20210114190021.GB13135@willie-the-truck> <20210114194129.GA13314@willie-the-truck> <20210115092313.GA13700@willie-the-truck> In-Reply-To: <20210115092313.GA13700@willie-the-truck> From: Linus Torvalds Date: Fri, 15 Jan 2021 13:32:57 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 4/8] mm: Separate fault info out of 'struct vm_fault' To: Will Deacon Cc: Nick Desaulniers , Linux Kernel Mailing List , Linux-MM , Linux ARM , Catalin Marinas , Jan Kara , Minchan Kim , Andrew Morton , "Kirill A . Shutemov" , Vinayak Menon , Hugh Dickins , Android Kernel Team Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Jan 15, 2021 at 1:23 AM Will Deacon wrote: > > Hmm. The feedback on the clang bug suggests that GCC is the one in the > wrong here (although the argument is based on C11 and I haven't trawled > through the standards to see how this has evolved): Oh well. That writing is absolutely the _worst_ kind of weaselwording standards language reading, trying to make excuses for bad behavior by basically depending on "this language is unclear", and trying to say that the buggy behavior is required by C11. What a disappointment. Absolutely nothing in the quoted C11 language says to me what that bug entry claims it says. The argument seems to hinge on "The members of an anonymous structure or union are considered to be members of the containing structure or union" and then it makes the completely uncalled-for leap that that means that because it was "int" in the const struct, it must be "int" in the containing structure too. Which is complete BS, and doesn't follow logically _or_ grammatically. It would be a "member of the containing structure" even with the "const" qualifier, so the argument they make is just inane. In fact, the _other_ sentence they quote clearly points to this being just a clang bug: "A modifiable lvalue is [...] if it is a structure or union, does not have any member (including, recursively, any member or element of all contained aggregates or unions) with a const- qualified type" and clearly this recursively is an element with a const-qualified recursive struct. Whatever. It's one of those "read the documentation squint-eyed to avoid doing the right thing" arguments. It's not worth arguing with people like that, and let's just ignore the clang bug here. Linus From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19011C433E0 for ; Fri, 15 Jan 2021 21:35:01 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C75EA206E9 for ; Fri, 15 Jan 2021 21:35:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C75EA206E9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=TRZr+gCDQBsSA6vymJfiMHOlyhjDg6cLtw+Xm5X8G9A=; b=viYFX01ucn4MBQPaRtR/XWunq jyRLWcDDmSvHJC2uq/X0dcYSD1vEmXWZZK6JowTy6FjqfG6eMrcPKB+CrfkNd1/YPuLdqkQMWp5AX cpf62pLw8+sn/yFoykpPXlRXkYGW9EjHi2hrK47CL922/OwJ1IRZptZoVu7iY2wMXXR9VBUm4N1qP T+iiSr18kwpx4Xsgi+icsnTu6WZu8e686ze1/9MGgbkq9pEsy0uZVMZ9cRUZG7yEXiWAhEbuz38Ac Yh9uc/dsWL60M6MmGb5ee9BLzQL/OQP2KYsU4xyUsfXAifXVRdyQUJyrlqPGJ4r6yJKn70gw0x+8t NSVCad/QQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l0Wih-0004yK-Qq; Fri, 15 Jan 2021 21:33:23 +0000 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l0Wie-0004xF-Ch for linux-arm-kernel@lists.infradead.org; Fri, 15 Jan 2021 21:33:21 +0000 Received: by mail-lj1-x22a.google.com with SMTP id u21so11954952lja.0 for ; Fri, 15 Jan 2021 13:33:17 -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=BQxUP24hpiBqEtJYhYwHk6U8ZAm2WakN0TBfaYLNdRc=; b=UwkikTy66sWmdnraVWEJ+LlzCNJYBCKbswTcMKOsHurlf1pkecqJjGDUv8bqcK2d1h x0Xtu+z3jgU8oB3RtulGryrnGgO1d4IxAVK+rusX5EUub8DSi2y8MoQmAHvHu+ai3IG0 E6lROXLPXv4yp3z0MlDnv1aLo+5QU1+6Z+sCE= 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=BQxUP24hpiBqEtJYhYwHk6U8ZAm2WakN0TBfaYLNdRc=; b=kJ/oFIruyFAV6yqInIz2T/vvqiIl1vANieQ+4VB09RqgFHahoC1WlMpamklgVECVTV 3hu80wgAteBM1PUeE/GJFTV7YNH9XSkfaNs7iZXzy+xU9zx5qtgM7dMAsKbS+XLEnHmP PtOACwcB/rclHktrgSzAy3aujWcJnz/09P73KSl1tjLYdLbEWkaS8ehCjc80RElagJQ4 J/lygeZzoH8DfMchQfpBM2Egp0ciJ++UzVj3VMhDOy8d8KKNrrr/0qMRX2GJlGxdZFq+ 5KRTarqPCSyQKR8fgkbUIeY+ANdDKxVyPgipN+fDLjQP3QQVIw135TEiTnEk/Fci8ZLY iYjA== X-Gm-Message-State: AOAM533dhP10WJ79MqvnYUYl/3Z+NWIMhUZBUCmCr5XAQiVOZKlRx2b/ PU8iRcK25rGxIMK1ql5pdvXEl6IkGrygKQ== X-Google-Smtp-Source: ABdhPJzvAMZ0dcalrMuRwLehxYCM19Ugs7KwKzRA2Ks/OEZPayg+3pge/xsMJqt6yVEatDaMmkUaUw== X-Received: by 2002:a05:651c:28f:: with SMTP id b15mr6008622ljo.348.1610746395986; Fri, 15 Jan 2021 13:33:15 -0800 (PST) Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com. [209.85.167.51]) by smtp.gmail.com with ESMTPSA id w15sm1032736lfd.95.2021.01.15.13.33.13 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Jan 2021 13:33:14 -0800 (PST) Received: by mail-lf1-f51.google.com with SMTP id b26so15279761lff.9 for ; Fri, 15 Jan 2021 13:33:13 -0800 (PST) X-Received: by 2002:a05:6512:789:: with SMTP id x9mr6054405lfr.487.1610746393145; Fri, 15 Jan 2021 13:33:13 -0800 (PST) MIME-Version: 1.0 References: <20210114175934.13070-1-will@kernel.org> <20210114175934.13070-5-will@kernel.org> <20210114190021.GB13135@willie-the-truck> <20210114194129.GA13314@willie-the-truck> <20210115092313.GA13700@willie-the-truck> In-Reply-To: <20210115092313.GA13700@willie-the-truck> From: Linus Torvalds Date: Fri, 15 Jan 2021 13:32:57 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 4/8] mm: Separate fault info out of 'struct vm_fault' To: Will Deacon X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210115_163320_473116_2E6311B2 X-CRM114-Status: GOOD ( 15.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jan Kara , Minchan Kim , Catalin Marinas , Nick Desaulniers , Linux Kernel Mailing List , Linux-MM , Vinayak Menon , Hugh Dickins , "Kirill A . Shutemov" , Andrew Morton , Android Kernel Team , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Jan 15, 2021 at 1:23 AM Will Deacon wrote: > > Hmm. The feedback on the clang bug suggests that GCC is the one in the > wrong here (although the argument is based on C11 and I haven't trawled > through the standards to see how this has evolved): Oh well. That writing is absolutely the _worst_ kind of weaselwording standards language reading, trying to make excuses for bad behavior by basically depending on "this language is unclear", and trying to say that the buggy behavior is required by C11. What a disappointment. Absolutely nothing in the quoted C11 language says to me what that bug entry claims it says. The argument seems to hinge on "The members of an anonymous structure or union are considered to be members of the containing structure or union" and then it makes the completely uncalled-for leap that that means that because it was "int" in the const struct, it must be "int" in the containing structure too. Which is complete BS, and doesn't follow logically _or_ grammatically. It would be a "member of the containing structure" even with the "const" qualifier, so the argument they make is just inane. In fact, the _other_ sentence they quote clearly points to this being just a clang bug: "A modifiable lvalue is [...] if it is a structure or union, does not have any member (including, recursively, any member or element of all contained aggregates or unions) with a const- qualified type" and clearly this recursively is an element with a const-qualified recursive struct. Whatever. It's one of those "read the documentation squint-eyed to avoid doing the right thing" arguments. It's not worth arguing with people like that, and let's just ignore the clang bug here. Linus _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel