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 45DED3858C41 for ; Wed, 15 Nov 2023 02:20:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 45DED3858C41 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 45DED3858C41 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700014861; cv=none; b=RNWa6K/Pq2kk/SquYrNEsV/cQ2fNSR0bH6zfqbJfWdtSOo40P8NOJmCNaTFK2QwiJo2/hivB6g7t9zd6+AEmTRfOXgOzjm98tl7z4c90F0u6rhk/DK8oEAwE5KW9BVcYKHXLkaZWaQ0ChgASYj0UuLPycGEPWXEaYzvIcVGdDQw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700014861; c=relaxed/simple; bh=njBPv/SF+P5JPXc+/B67BeLcYAZNa7IUu3Z26i+PH1A=; h=DKIM-Signature:From:Date:To:Subject:Message-ID:MIME-Version; b=TqrAF9b1DED21I+DZUPJq9jER1G3aMI3KI9E2Np7bPm4JUa6W+SpdiHXzuTF+gaID8bcm/TeyKRN1Hay7Wu6y6mdccsjxOvKBkrntWNYXetsR7YsI7uo/aJfWu68Bky8vGE0FPHd0qMm1JF55e0xjhgshALscS4eq7ELi+1sSF8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700014858; 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=S+vxRgmXJdGDtIJqc+88oXhxP+2uK8p+DyhOKSWS9Zg=; b=EuCayvLB3zpYeLArlhvSwWR6egpdD9YcSoWWhuxTHqEbXCI64xnzoGgjuHzN4Zf5aELiqx 7OcZUAahA4xdvhxCOFrtEPZUenKxxo5HTWopsShCop+X0sVmEuATGCQL0ZSBgtcFvavmIp i/gOAsSbEDjcgGJMAPnImSguVxQSY7U= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-651-iYSjNXAiP8utO6-V24lnrA-1; Tue, 14 Nov 2023 21:20:57 -0500 X-MC-Unique: iYSjNXAiP8utO6-V24lnrA-1 Received: by mail-qv1-f69.google.com with SMTP id 6a1803df08f44-670b32845a7so72464606d6.3 for ; Tue, 14 Nov 2023 18:20:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700014857; x=1700619657; h=mime-version:references:message-id:in-reply-to:subject:cc:to:date :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=S+vxRgmXJdGDtIJqc+88oXhxP+2uK8p+DyhOKSWS9Zg=; b=h1TjrRgKNphUG3Nbe6cWIQqVtUA2AoB4QUVvbZuvFm+2jA5iQqx4CpjDiDrODzMh/8 hZjtMNSahHyPhsHv0CMqQRN71Zz3MqBkwjc6s2wfVwdrGNVyMmdK0W72OdZ5JDtcvouw dpKv7/5GUyWXZePpKneEXwAdczAqmruf6hRiT0t133kg9JfZMejBQATyGaSZ0GiqkbPh EbilYX1adUhhfeSXqKeNmg2QpwO7zUa6w2YYcXlfuCBFCBoG6zL3UcniPFjp8E2Wd6Hb uLddIqzIyG2HmRaMgbBIPdtrFwsulIgrliXIm2jc9hhXoUSQPufV8MDx0u6pdE4ccwkg 1enw== X-Gm-Message-State: AOJu0YyrVSUxuZMQq1pdJfQHXdiMq6ViRFXTxCYAchcT54xuXR0AfWKB 119wA6RYeWkQKUhT+rCHtjRMdZq9foJC7uSGugjKlNbpwPlUSWCAKq2kYMUiKKQjBkNCkHFO7hH 4U95HTJ+QSM6CUP0= X-Received: by 2002:a0c:f747:0:b0:672:6df3:e75e with SMTP id e7-20020a0cf747000000b006726df3e75emr3778884qvo.64.1700014857285; Tue, 14 Nov 2023 18:20:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IG4VF2wM/O//twiagiXHtrCAsPCkSYP3Br3TirkCacuzMMVBUC/98kOq30ZLuZvAaUpDxTVmA== X-Received: by 2002:a0c:f747:0:b0:672:6df3:e75e with SMTP id e7-20020a0cf747000000b006726df3e75emr3778871qvo.64.1700014856988; Tue, 14 Nov 2023 18:20:56 -0800 (PST) Received: from [192.168.1.130] (ool-457670bb.dyn.optonline.net. [69.118.112.187]) by smtp.gmail.com with ESMTPSA id p6-20020a0ce186000000b0065b08bb01afsm147164qvl.124.2023.11.14.18.20.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 18:20:56 -0800 (PST) From: Patrick Palka X-Google-Original-From: Patrick Palka Date: Tue, 14 Nov 2023 21:20:55 -0500 (EST) To: Jonathan Wakely cc: Alexandre Oliva , =?ISO-8859-15?Q?Fran=E7ois_Dumont?= , Jonathan Wakely , libstdc++ Subject: Re: [PATCH] libstdc++: bvector: undef always_inline macro In-Reply-To: Message-ID: <0bc0279d-0f50-a0a6-1535-50dbb6ce1110@idea> References: <0e2723e5-a60d-484e-b4f4-951bc8dfde8d@gmail.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=-13.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE,WEIRD_QUOTING 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 Thu, 9 Nov 2023, Jonathan Wakely wrote: > On Thu, 9 Nov 2023 at 19:49, Alexandre Oliva wrote: > > > > On Nov 9, 2023, Jonathan Wakely wrote: > > > > > But I've just realised we probably want to #undef the macro at the end > > > of bits/stl_bvector.h too. > > > > I'm not sure why (what if another libstdc++ header were to define the > > macro, includes stl_bvector.h, and then use the macro expecting it to > > still be there?), but I suppose this is what you mean. > > It's consistent with all the other definitions of the macro in our > headers. We always define it locally and then undef it again at the > end of the header. You're right that that makes it rather hard to use > reliably. Hmm, in which headers do we currently undef _GLIBCXX_ALWAYS_INLINE? A bunch of headers seem to conditionally define it, e.g. bits/atomic_futex.h, but none seem to undef it. I wonder why we don't just conditionally define this macro once in c++config? > > > Regstrapped on > > x86_64-linux-gnu just to be sure. Ok to install? > > OK thanks. > > > > > > > > From: Alexandre Oliva > > > > It's customary to undefine temporary internal macros at the end of the > > header that defines them, even such widely-usable ones as > > _GLIBCXX_ALWAYS_INLINE, so do so in the header where the define was > > recently introduced. > > > > > > for libstdc++-v3/ChangeLog > > > > * include/bits/stl_bvector.h (_GLIBCXX_ALWAYS_INLINE): Undef. > > --- > > libstdc++-v3/include/bits/stl_bvector.h | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/libstdc++-v3/include/bits/stl_bvector.h b/libstdc++-v3/include/bits/stl_bvector.h > > index 2b91af2005f2d..1b7648535c523 100644 > > --- a/libstdc++-v3/include/bits/stl_bvector.h > > +++ b/libstdc++-v3/include/bits/stl_bvector.h > > @@ -1628,4 +1628,6 @@ _GLIBCXX_END_NAMESPACE_CONTAINER > > _GLIBCXX_END_NAMESPACE_VERSION > > } // namespace std > > > > +#undef _GLIBCXX_ALWAYS_INLINE > > + > > #endif > > > > -- > > Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ > > Free Software Activist GNU Toolchain Engineer > > More tolerance and less prejudice are key for inclusion and diversity > > Excluding neuro-others for not behaving ""normal"" is *not* inclusive > > > >