From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id C5244395B403 for ; Wed, 10 Apr 2024 18:37:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C5244395B403 Authentication-Results: sourceware.org; dmarc=pass (p=none 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 C5244395B403 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712774273; cv=none; b=K8KcSlpH28UTspZYcq6yU+wip00lXfh0xPnlvB+ZP8bNHcDBBX1j45NvSEjsGxQPkyxKIfUjpgS3VS1OSsDaM47dLptztYCdl86raYjFAv57FCVnGBQqw3lx7MPOdJAcPfQDIWu8SO7xcZQdeqim/TjVHi/Hj/ciQzeQslrG84M= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712774273; c=relaxed/simple; bh=yIPTjSzP2PYgdTP0+QGMXolimTyihzW1yVS6h/yce1U=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=pBSIHnYg9Irml94/qHxBduXdQ3aheIJ8/tAr+QUz496HRQRSTlGxVfZj4zQWFvqOROFg3VBhez+AXMnYPxlhlxEiZpje1Aa3sBOCOEU03ZeiS/A97JzqMW1C283JLcc3X/cF4JOJDSrUKT47z8xc6SBgunzyErTA+y0j5+i3mh4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712774261; 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: in-reply-to:in-reply-to:references:references; bh=taXUiky4fwNHKvaXx/+9piHTw9AhYG3z565pAbNtmE0=; b=CMu2kJFCqyI/ltj8qZjzBe1WpdIVknzryUL2PLxKIG3nY1R0bvDjVe63h/0/EPG2KaGodn 4tT2nRfVjpDqYvXztNsDvXmpWCwFPu/5D/cnGUsqsoG/DNHj7td++IH558nm6rVM0m/OZG OjuN65m27vWLjFA3ZpUlJxrb729ufrg= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-400-nD_nab43N8GIarGvMbua-g-1; Wed, 10 Apr 2024 14:37:40 -0400 X-MC-Unique: nD_nab43N8GIarGvMbua-g-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-4165339d3a5so18663645e9.3 for ; Wed, 10 Apr 2024 11:37:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712774259; x=1713379059; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=taXUiky4fwNHKvaXx/+9piHTw9AhYG3z565pAbNtmE0=; b=KJp0EhpBC6hiRSd3tKCySAKvwm0e+ZpUbSLcztMEBnaiM7+uavn34chNkIZ7XJe7Sh 4UspCiJ1oZu3Yra4pV/p14El7/Z4WdPndOida08G9VwQL97LPUifP+1Xt2o20gxmEQon XadeWxYsew2RKWPiCzKMk5hWQRRgsohqgRS4CeCw9bBcIVa88P2TGPYa3vK6XXGDvuBc WAayOSn3Zw7yeO17ciTNtOY20klIyM51IfzndLlZiwsexeTmelhvaaWkp2c/kj1U8B32 aRCF/Sys+rjzvtySCiFU5+UDRIZ7dyhfsQ6FOpVJRdq0wkJDU2plLdaMNE07GMACFld2 Qo0Q== X-Forwarded-Encrypted: i=1; AJvYcCUip9+rFNpEbFOjwc1uaFKAMIxk2WUuLZxP7W/iEyTE4ChRqjyOcwTnZeBqMrHg9UhJpQ1ZWZzydteNDotrU3KGBAXw9cyfkw== X-Gm-Message-State: AOJu0Yy39qzZfMqynVKzvNceDHNKpN3kElVPeYd6TtqAt4MTCmlCVX6s sUfkpWSGJvpOiQLKjuheBWucFqMREvV/SgHPPvVMzfLriSx2BRhmBpsUwVkWBoQHSIf2fbGR5vZ jTWe1xEbTm1Ebu0vnIRT2uffcMXF/eENUrHxCeiTk4RfKSsMYYXc6uWo= X-Received: by 2002:a05:600c:3b0f:b0:414:9075:114a with SMTP id m15-20020a05600c3b0f00b004149075114amr2549502wms.2.1712774259058; Wed, 10 Apr 2024 11:37:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEIAUXoz7kKwx8q+/csWxecpSCAJ7/8xWH03AzwOP/6RFlW/q9CeZqOUZLjkUBO4IzXKUCBJQ== X-Received: by 2002:a05:600c:3b0f:b0:414:9075:114a with SMTP id m15-20020a05600c3b0f00b004149075114amr2549485wms.2.1712774258637; Wed, 10 Apr 2024 11:37:38 -0700 (PDT) Received: from digraph.polyomino.org.uk (digraph.polyomino.org.uk. [2001:8b0:bf73:93f7::51bb:e332]) by smtp.gmail.com with ESMTPSA id bd10-20020a05600c1f0a00b004162e3e5b9asm3077905wmb.44.2024.04.10.11.37.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 11:37:38 -0700 (PDT) Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.95) (envelope-from ) id 1rucnz-00CB9Y-Ab; Wed, 10 Apr 2024 18:36:19 +0000 Date: Wed, 10 Apr 2024 18:36:19 +0000 (UTC) From: Joseph Myers To: Qing Zhao cc: richard.guenther@gmail.com, siddhesh@gotplt.org, uecker@tugraz.at, keescook@chromium.org, isanbard@gmail.com, gcc-patches@gcc.gnu.org Subject: Re: [PATCH v8 2/5] Convert references with "counted_by" attributes to/from .ACCESS_WITH_SIZE. In-Reply-To: <20240329160703.4012941-3-qing.zhao@oracle.com> Message-ID: <4e305cb8-ae4e-301f-44fd-12de5e4811b@redhat.com> References: <20240329160703.4012941-1-qing.zhao@oracle.com> <20240329160703.4012941-3-qing.zhao@oracle.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-4.3 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_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,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 List-Id: On Fri, 29 Mar 2024, Qing Zhao wrote: > +/* For a SUBDATUM field of a structure or union DATUM, generate a REF to > + the object that represents its counted_by per the attribute counted_by > + attached to this field if it's a flexible array member field, otherwise > + return NULL_TREE. > + set COUNTED_BY_TYPE to the TYPE of the counted_by field. Use an uppercase letter at the start of a sentence, "Set". > +static tree > +build_counted_by_ref (tree datum, tree subdatum, tree *counted_by_type) > +{ > + tree type = TREE_TYPE (datum); > + if (!(c_flexible_array_member_type_p (TREE_TYPE (subdatum)))) > + return NULL_TREE; There are redundant parentheses here around the call to c_flexible_array_member_type_p. The C front-end changes in this patch are OK for GCC 15 (after GCC 14 has branched, and once a version of patch 1 has also been approved) with those fixes. -- Joseph S. Myers josmyers@redhat.com