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 C8D0538582A3 for ; Thu, 9 Nov 2023 20:18:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C8D0538582A3 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 C8D0538582A3 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=1699561118; cv=none; b=s55MoQfuCxTt4K5ZoZzFzlG/41Yb8nYwNsEIb0Zj3AydBauO3fVylJ2mY8bxt1pusTrV/h4WW6yDw1N6ZYcsUDXg7PHxbPPQXBSaYmmPUlTP04OQcft1bIzPe6mOmhV55IaSzQQEaRIVCWZTuypnkbZiG1myE8XkGd1DH4k9PwA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699561118; c=relaxed/simple; bh=ve8B7MszcJl4d/65FbwMwEvCdDUiWtGjwrMtYO0bGYM=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=JgWsHIAdHhB4LSZ8h+JzWmIA1iXe+l4ME1L21AcL9TH8XBbLk0OR336JXamtUk4g7AyK7hl4eG7AZIOTjW5ugHxMxEU7DzFrMpej9P/rBFpD+1XVygnoe/CUnQF49L5rrMDAkch12GO4am0B92C2U6OPOiW6M8GQn8oCTfuBnyE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699561116; 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=zHXfn0tr71FyO11sp02JVg8a6LosnOC6fH0CuuLD8gY=; b=XbQgUkJVz4HbuJ6xbBTRd9OgzPXpJzcu3U9Apk+PdUkhE8cxKeL3JZo31jEe58+6Bp8Q96 tkyoaGmvDknKmv7JAmI1rOKi7jZ9Vo9ljHojLZny0AMA5BGDPSMTq9WinOYF/vgwhTl15x JJBdZ4Hr3cdvjLs8Z707SF1/W4eCKkk= Received: from mail-yb1-f197.google.com (mail-yb1-f197.google.com [209.85.219.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-390-jtlAjiEVP9ub9-AixwyZgw-1; Thu, 09 Nov 2023 15:18:34 -0500 X-MC-Unique: jtlAjiEVP9ub9-AixwyZgw-1 Received: by mail-yb1-f197.google.com with SMTP id 3f1490d57ef6-daa2684f67eso1086293276.0 for ; Thu, 09 Nov 2023 12:18:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699561114; x=1700165914; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zHXfn0tr71FyO11sp02JVg8a6LosnOC6fH0CuuLD8gY=; b=HRTNCGRydT2700EkHKaYHQtUex2tlJvMVlP4iNpxnYKhIqN1uivjyoX7g8UrCI8YSx L6nBxHGc+cnnBx+RS9rr3GHGsFlR5xzqvGH/M9B8BYm1SDbeoZK3A1reIySQesd1z+sn nnVlJzbtAVcLiKEnzyqA8korNXjD3mbozdqaxkvPS0eaVIGFWN22NGiIVKx3ozcb4liR 4B1MH64MLVguRw07cw3Il9OQUySLBgHmQDCi6DthSbPgpf//DPyxEaTYPmuvqOZiY2+u RTI2eCaX5aNRvDbF3yTQGD6/jdfq317zk9m8TOpxvtEt03BdmT2B5jdzSg/RaCLWsHEI ewNw== X-Gm-Message-State: AOJu0YxOrKgqLsFVCq1iNEIPWi0ZltxRYsKLG6NtXRi+Dxg/KHEBCv/2 yOkeV89VucHaOhgavfgwWigDiVV86mNoX05EipQxioGwpepAQ5cD7i7EfsDgj7T4TNmDil2og6s 03ogQorDSYIKZKMjok+8UvP44G3KaEh0= X-Received: by 2002:a25:3417:0:b0:da0:454d:cf57 with SMTP id b23-20020a253417000000b00da0454dcf57mr302630yba.16.1699561114152; Thu, 09 Nov 2023 12:18:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IHjCOgSFcOHhgjB0U67Er8B4lZXniOENzXuRP7jTQb+OL4KCZZir5MMJvzRLaKtlKAP39lwTdcmiYjJICM1pdk= X-Received: by 2002:a25:3417:0:b0:da0:454d:cf57 with SMTP id b23-20020a253417000000b00da0454dcf57mr302592yba.16.1699561113477; Thu, 09 Nov 2023 12:18:33 -0800 (PST) MIME-Version: 1.0 References: <0e2723e5-a60d-484e-b4f4-951bc8dfde8d@gmail.com> In-Reply-To: From: Jonathan Wakely Date: Thu, 9 Nov 2023 20:18:22 +0000 Message-ID: Subject: Re: [PATCH] libstdc++: bvector: undef always_inline macro To: Alexandre Oliva Cc: =?UTF-8?Q?Fran=C3=A7ois_Dumont?= , Jonathan Wakely , "libstdc++" X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-12.2 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_H3,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 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. > 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 >