From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from purple.birch.relay.mailchannels.net (purple.birch.relay.mailchannels.net [23.83.209.150]) by sourceware.org (Postfix) with ESMTPS id 0BD823858D39 for ; Wed, 8 Feb 2023 19:20:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0BD823858D39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gotplt.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 27EBB5014B5; Wed, 8 Feb 2023 19:20:51 +0000 (UTC) Received: from pdx1-sub0-mail-a306.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 9FC1E50113C; Wed, 8 Feb 2023 19:20:50 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1675884050; a=rsa-sha256; cv=none; b=VPTGKHxzGMMNLBUR+IHIcyizrjlut3k8WDZrWYlxBRhL4pCbL0gV0/sCSs3Nsewb4AhJc3 43cinalClC/DLY286dRL4nemHsleuT69vmE3uaMjvLaKdhgCixlV6KBArG8AaVbM9SSKPC jSNfoi4lmC3mmzJnNhd0YogQ+zGCEKTov/XGG2Nrrp6pWzrjsFaRqs1KFmcyLDPxMKoliM A4AvzkdBnEAk3+oVDTt/pwiUyMVsS6aDFgv2UGOcoDRPG4a3m4CvB/+fSJEbxdhEzwf2so cj9DrGU2HNekW1sP+VyI43oabYEdi+dztRBsZCPyCRoQMDtblYrD4cFeOvJvCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1675884050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=znVaKGg8PUuXBD9NbElWfdVeF6yBgU8rfhYdKfMjSIo=; b=AMyhpix1NPyYectaA7wyr2zZ9KirJBM8vlXuXoiD/uFRHhObXdhIJ6JpDxa1UwREeOqet1 SPkJ5bHdimip6O6QXscV8Zfz1DYmY5nkPZBUWb3so0/YNb+R020W7DAWl8ohmMF+dEuURv HpgD19Qrp0n+GDpq5L7CBe1VcN0L+EO3E3vabcIViJlhvP/9xSn8FthXkQ/XAHaEPphAHW MySa8SgZ5g7QwqYpqZmHjjLBPIoAIlu0W+HAvpvhnK1tmAptKhQA/tbaakvwibghmN4Gtf F4c+C9Ari44eXasYEB27v2tExA97+4/u9/E0xsZ+ESWtUk8kySatXFG7nT5i3g== ARC-Authentication-Results: i=1; rspamd-98dc9695d-khhcd; auth=pass smtp.auth=dreamhost smtp.mailfrom=siddhesh@gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Tart-Interest: 432d35e352473fe9_1675884050944_4067902139 X-MC-Loop-Signature: 1675884050944:3020260595 X-MC-Ingress-Time: 1675884050943 Received: from pdx1-sub0-mail-a306.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.99.229.28 (trex/6.7.1); Wed, 08 Feb 2023 19:20:50 +0000 Received: from [192.168.0.182] (bras-vprn-toroon4834w-lp130-07-174-93-43-36.dsl.bell.ca [174.93.43.36]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a306.dreamhost.com (Postfix) with ESMTPSA id 4PBqbP534Tz24; Wed, 8 Feb 2023 11:20:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gotplt.org; s=dreamhost; t=1675884050; bh=znVaKGg8PUuXBD9NbElWfdVeF6yBgU8rfhYdKfMjSIo=; h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding; b=CfsAt31SG9KvbOrtTCxhPFKeLTiYI0c/dFS50rMLyy+AeWfqNav70AXRB0doTafTL XcjhYp70HqU3ftf11qrALqlrdbPuBgP/MJOvFHQ2IDcg8r1WFiv7ZpTkPfYo94ieHe zWNJ52aSqQi8jFI+tXjeohZF5M2dOTAhPG1kZ56pZfa08jO4eiAnrPmDhszfAA7R15 n4AQwCrab8SX+kISZ3ed9E9c8qF2Gvb1TmBRFRWfraVg6S4+UrWdqw6bN7BzVcgpnz OahKV4Xvbk8URcexLLJjKsVPOBAOjavxoU/VxVMSKH6cwzhDg04VPxTi192ojtQEmw pmzEYBYrt1Ofw== Message-ID: Date: Wed, 8 Feb 2023 14:20:48 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832] Content-Language: en-US To: Joseph Myers , Qing Zhao Cc: richard Biener , "gcc-patches@gcc.gnu.org" , "keescook@chromium.org" References: <20230131141140.3610133-1-qing.zhao@oracle.com> <812910BC-870E-4432-870D-538024F1A510@oracle.com> <3B30CFBF-5004-41A4-940D-1F23C010403B@oracle.com> <4E515AA5-2069-497E-A301-EC8ED744E780@oracle.com> <367EBE15-1675-4D29-A9C2-A4A57FA4DB62@oracle.com> <2184ee29-9a36-e85-11c5-81c47aa22055@codesourcery.com> <91678405-D50E-405A-98FB-F3BA6888577E@oracle.com> <2AB95191-B5D9-41AC-916A-C57ED20DF55E@oracle.com> <17bc7992-23b6-63dc-3a3a-1be016d3bbb@codesourcery.com> From: Siddhesh Poyarekar In-Reply-To: <17bc7992-23b6-63dc-3a3a-1be016d3bbb@codesourcery.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3031.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,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 List-Id: On 2023-02-08 14:09, Joseph Myers wrote: > What must be avoided is -pedantic diagnostics for > > struct flex1 { int n; int data[1]; }; > struct out_flex_end1 { int m; struct flex1 flex_data; }; > > regardless of whether considered flexible or not, since that's clearly > valid in standard C. > Are you sure about "regardless of whether considered flexible or not", since ISTM the validity of the above in standard C is limited to when it's considered a non-flexible array. So with -pedantic it shouldn't warn, but it also then shouldn't consider it a flexible array. In other words, perhaps it makes sense to imply -fstrict-flex-arrays with -pedantic? Sid