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.129.124]) by sourceware.org (Postfix) with ESMTPS id 446FD385C6DA for ; Tue, 22 Aug 2023 17:50:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 446FD385C6DA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692726616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Virz2JnSinwfROPBNnaq5MPncRcmRrGX8QtMGgb6GDM=; b=NrbpnK6pwqs/3r9EMWVnBlhqz8Vu7LvkqV+Cuu9tZ+Y4pEPVvE0WPh6xIK7YKs+wyyA9G/ KiYvUhQBnoQPR4DN5KOCm6g/ITb6y14Xe7m1WDWJRMeZw9G4yur8nuFymWbVsk5AKWx/JG OZvIHzdcHu7ANBq4pRh8/BdIFx0NG0M= Received: from mail-vk1-f199.google.com (mail-vk1-f199.google.com [209.85.221.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-425-PwA1RDOqPeSOqaP42u_orw-1; Tue, 22 Aug 2023 13:50:15 -0400 X-MC-Unique: PwA1RDOqPeSOqaP42u_orw-1 Received: by mail-vk1-f199.google.com with SMTP id 71dfb90a1353d-48d0ec89faeso905023e0c.2 for ; Tue, 22 Aug 2023 10:50:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692726614; x=1693331414; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Virz2JnSinwfROPBNnaq5MPncRcmRrGX8QtMGgb6GDM=; b=lPcYPiOBd1tA51luexZsRTE50h2F2nfXJyNyLN7ryJSX4gm87yjTteJ/JqfOlkuvOY tj4NKj/5ZV4N0YsZ5ot0i+Fr2+0lshCIE6ycF8L+IptaubOTwyxjxw0K1LwhqB05UMuh v3nUuwIdjRE1S3knGVRevnFN9FkZU0a5wJa+jk5uk69B/eNTq3JfmxliW0EcKE+iw9Q6 ijYwKE9skzVx2c/0t8R6wkyHvXs2H4ZBzNd9NSr6B5m4XRJXSxalEMn/glhElORrztl8 toG//++BG69mQAxQZ/XU/dTmncSfuBh6px5EFJRWkh36142SAwmhFE5iUYB3nG7jejiR m1QQ== X-Gm-Message-State: AOJu0YyeMwIN8h6nvyhPBp0Mcp27MBBBfBWySKtZQ5TBQjXzqmU789ws hzd7OOmgrnJgsqP1moYCgHQYoADWJvaPmXrqzr4LdCTqvwSKPe0wT1L8Qv+ZDV0iEIbAgcoFNAF m7iKigeMFe/dZ7e8Y2rZdF0c1Hw== X-Received: by 2002:a05:6122:ca6:b0:48d:d0e:e14c with SMTP id ba38-20020a0561220ca600b0048d0d0ee14cmr8364402vkb.7.1692726614692; Tue, 22 Aug 2023 10:50:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHbQ64bkPNuouX2L8CSrgL63jrjIiohDHR7KxneUcX91eXgvSAunpakNTrfSSkk2LWd63fttA== X-Received: by 2002:a05:6122:ca6:b0:48d:d0e:e14c with SMTP id ba38-20020a0561220ca600b0048d0d0ee14cmr8364378vkb.7.1692726614339; Tue, 22 Aug 2023 10:50:14 -0700 (PDT) Received: from [192.168.1.108] (130-44-146-16.s12558.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com. [130.44.146.16]) by smtp.gmail.com with ESMTPSA id v23-20020ac87297000000b00401217aa51dsm3180569qto.76.2023.08.22.10.50.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Aug 2023 10:50:13 -0700 (PDT) Message-ID: <89920577-18ee-d9cd-4e25-e405dd40e2d0@redhat.com> Date: Tue, 22 Aug 2023 13:50:11 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: [PATCH v4] c++: extend cold, hot attributes to classes To: Javier Martinez , gcc-patches@gcc.gnu.org References: From: Jason Merrill In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 8/15/23 09:41, Javier Martinez wrote: > On Mon, Aug 14, 2023 at 8:32 PM Jason Merrill > wrote: > > I think you also want to check for ATTR_FLAG_TYPE_IN_PLACE. > > [...] > > > +  propagate_class_warmth_attribute (t); > > Maybe call this in check_bases_and_members instead? > > Yes, that is sensible. Done. You still need an update to doc/extend.texi for this additional use of the attribute. Sorry I didn't think of that before. > + warning (OPT_Wattributes, "ignoring attribute %qE because it " > + "conflicts with attribute %qs", name, "cold"); ... > + warning (OPT_Wattributes, "ignoring attribute %qE because it " > + "conflicts with attribute %qs", name, "hot"); Function arguments continuing on the next line should line up with the '('. > + tree class_has_cold_attr = lookup_attribute ("cold", > + TYPE_ATTRIBUTES (t)); > + tree class_has_hot_attr = lookup_attribute ("hot", > + TYPE_ATTRIBUTES (t)); ...so I'd suggest reformatting these lines as: tree class_has_cold_attr = lookup_attribute ("cold", TYPE_ATTRIBUTES (t)); tree class_has_hot_attr = lookup_attribute ("hot", TYPE_ATTRIBUTES (t)); > + decl_attributes (&fn, > + tree_cons (get_identifier ("cold"), NULL, NULL), 0); ...and maybe use a local variable for the result of tree_cons. > + if (has_cold_attr || has_hot_attr) > + { > + > + /* Transparently ignore the new warmth attribute if it Unnecessary blank line. Jason