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 992EB3858C42 for ; Wed, 15 Nov 2023 08:22:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 992EB3858C42 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 992EB3858C42 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=1700036561; cv=none; b=o6qDit06AV39y00mGPo0kZpiNSQbz10YG1mjBjMgI4uXr9GQp5KeNvSbYiuS9d6Bslnlg71LS3Zx8aO9+zBfmRjFnhuK3CP2tgMk3h5so4YglIT1jfDFJiclMZfxZhsSsX3pmsL1sbr4vuZ8ggU1zdzM4I5fzDJ/rhoKh6HA6dQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700036561; c=relaxed/simple; bh=WjTIRyRIHTtZxh1iKL+vK1b4E+ENkxIFwVXX9x6jLsw=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=XMglTJ8ncHjJecykzF1Pms1+oWc3TyRU7aYjyDZmgGwWuhdbJA3IXkNFrSvQRy8c/w6zy/WWkCJAUkbOHOlCF2lxqVHy9u3goQWyC1Uy6/JGmGJt08bqn/21sWpVN59wwuH8TE7gdkLLMrZ1UONJwCzAhLpV8hb5EQAAbaIz3OY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700036559; 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=4XEBxYEANSKEn11+pBTZnEOlRAW2S3CePIGChX4SH08=; b=SSVA0Ri7PER6PuncJylCx634MfnOhRKdj65+oDzK56zpAxGrNSeubvXxf8GKMwbPeuFYcY FRwSfV5/bhY4N/fuXIC373lMXsefEty9egBqScLpCkd0bw5oGEJKdTFXFkgclnV/RwF7Nj WIr1juW/Jy8e6LWcWyl1xZ6cqiWslwA= Received: from mail-yw1-f200.google.com (mail-yw1-f200.google.com [209.85.128.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-597-z70Rb2KbNnevtFdVnUdPkw-1; Wed, 15 Nov 2023 03:22:35 -0500 X-MC-Unique: z70Rb2KbNnevtFdVnUdPkw-1 Received: by mail-yw1-f200.google.com with SMTP id 00721157ae682-5b064442464so91662287b3.3 for ; Wed, 15 Nov 2023 00:22:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700036555; x=1700641355; 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=4XEBxYEANSKEn11+pBTZnEOlRAW2S3CePIGChX4SH08=; b=VoLbMsPey9J0n3CKCj/oLeqUkHPkYcZOaaH1gHMzCzHo0FSsul1QpHdaCLTfeqFnE9 x2qRagI7U2FH2jF1h+yTr7T+6Z1dNdTw0TOUVU2jliRtzbrseAeYvC25XqAx6bTqScOf v64DKl1b/C6Eor/9r35qWVtk53My2tip+YMfj7MQPBHr+jq0aqZTZOhqYdnW0etlVDY8 BZy9leiGJ9Pi9+GPJ+N3vtxBdMEPEIJCH+JSWZG49ZJE9xXg6mxSmqJPuHaQ59QbADdC E4UZyrCtBCtlNhWPEd0+nbIoXfdAbMBjqXPAfFB/2NlM8ir0+dK/8MhEEO4EzZMbFvrB VI/w== X-Gm-Message-State: AOJu0YzZJG7Hw4gQnzTtK77/nxjYAcR8OGmGDzXTAbeDEnYTRxJPuREn 8J53rDYv5dAEWQ2ifvRZ+sOtK+x1zXm6im06r1EWePTiF5LHzXk1C0OFY/FDU8qHeyMl1jcGCEv SHsYh6VI7H/dnTBCcOsI0x34517w9r9U= X-Received: by 2002:a81:6ccf:0:b0:5a7:fc20:7848 with SMTP id h198-20020a816ccf000000b005a7fc207848mr10960834ywc.1.1700036555041; Wed, 15 Nov 2023 00:22:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IHMCE88qNTf3iXRUIzgtmZgaXFFgCbTgWrg+zI9hmedHXCe0wSbxSQ2ZkJ/IZHPu3QGUg/Ed9VENHIK6Js/xMQ= X-Received: by 2002:a81:6ccf:0:b0:5a7:fc20:7848 with SMTP id h198-20020a816ccf000000b005a7fc207848mr10960823ywc.1.1700036554717; Wed, 15 Nov 2023 00:22:34 -0800 (PST) MIME-Version: 1.0 References: <0e2723e5-a60d-484e-b4f4-951bc8dfde8d@gmail.com> In-Reply-To: From: Jonathan Wakely Date: Wed, 15 Nov 2023 08:22:23 +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=-6.4 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,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 Wed, 15 Nov 2023 at 02:44, Alexandre Oliva wrote: > > On Nov 9, 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. > > Not only that. It also seems to cause failures, but I messed up in my > testing and didn't catch them. > > We've seen gcc-13 regressions in g++.dg/modules/xtreme-header* and > 27_io/basic_syncbuf/sync_ops/1.cc. I suspect they're going to show up > in trunk as well starting today, since I've just installed this bit > (unfortunately, shortly before I learned about the regressions) > > I'm about to rerun trunk testing and, if I confirm the regressions, I'll > revert this followup patch. Yes, please revert. I misremembered. I thought I even checked my assumption, but I don't see it in my shell history now. Sorry for the mixup. > > The symptom in gcc-13 is that bits/semaphore_base.h fails to compile > because _GLIBCXX_ALWAYS_INLINE is no longer available. AFAICT it relied > on the define from bits/atomic_base.h included by , but > includes that, in stl_bvector.h, undefines the macro, and then > when bits/semaphore_base.h includes bits/atomic_base.h again, the macro > doesn't get defined again. We should probably define and undefine it > explicitly in semaphore_base.h as well, and everywhere else that uses > it, if the current policy is to be maintained. > > Backporters beware ;-) > > >> * include/bits/stl_bvector.h (_GLIBCXX_ALWAYS_INLINE): Undef. > > -- > 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 >