From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id 816303858D20 for ; Wed, 15 Nov 2023 02:44:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 816303858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 816303858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::42c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700016284; cv=none; b=xoCkRVnJQm98nnnf2OFfTyB5qFMtkZZl+SptoYGGshF3xIbfRouyNOAzWNXGPVUBwe9r0OFGhBAEuqszqGtYSDVUgjyAigwvcXkGi5WJiD/Y5PcDHsacePEMS6+gnfIa5ywcU9szUbea3ibce7CgYmQ05CM2TUmffyp5s+JQrOk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700016284; c=relaxed/simple; bh=KfnwK+Dkr/M1Gwl59kbDRpxccyvwGnH1h7sBa0/Hx2E=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=mhp9bWbg5N8WozpozvkHhYmhOtv0wd8hPu1lQkmvE6Uuq8Br+q3wFdbTMF7uAKLQw50i5yyNhlIsI7MzBdJeTfKbRuI+dLauYJVtLA7+4KoHg4facs0CFUUCFOgggrxJBEsVQpARF5e4B1+Rmh8yOSFDL7+JEXH7GXtFlMnqYR4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-6c4d06b6ddaso4442406b3a.3 for ; Tue, 14 Nov 2023 18:44:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1700016281; x=1700621081; darn=gcc.gnu.org; h=mime-version:user-agent:message-id:in-reply-to:date:references :organization:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=bK4s+RZFawx3SPHBLFRjYlEFhNkCYBm/TlEuVTdSrzU=; b=GJTPXQWSkIsJvADlvo+jT6SOLlKPpnkO2fzTF6NhtP+t/0Oi4qKvl1r0hsXF8S1XCf vpL5pwNAQnK3ABR84J4JriCwYid9wCV5fP0x9NwqJCyTSSISdAh90/272GKsBQYgo8kY fZd/Lb+pgxsY8pWZ/wbGEwDvkIX271R4V1jcgxu51EOV+ik7EsWOKpSATc9P+Ry10Isa chp7ZjQ/Ls5KusqTCb+z90TJYhXGf83MK1JciQMd2lkXn55T3W3cZ5gEyOtb1WCf0YXw Zt39Qw+PvoyxsXx1THmKA2inDQo7uNhs14hm0wEMLK6+42Pk6CTi77/cIOEDGw3t1SDu kFuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700016281; x=1700621081; h=mime-version:user-agent:message-id:in-reply-to:date:references :organization:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bK4s+RZFawx3SPHBLFRjYlEFhNkCYBm/TlEuVTdSrzU=; b=L4LqnJiA7oRmqI2qmBNxyUQs+H2ZTE4lDjTNj4mlxTOdxHmzMeFbQAxTQL8BUqWwgM jAq8hSwpJRqc1Icp7Z69aS6sOqyvZkEqdPPIbYvKBVONYRJI3+eplTKxT7zAHnmXKtKV QlBrLnFOrOdCmSpjAMbfn8uERwj/2+BROvCAnh6zrYV/dzeARh2NbP92YtjRMK3SkzE+ dUePCBVhsOEkYzZqEGYxcQxf0AmVQkYZKcDWv9F4xGldO30aZhY6lKrUPwss7u93ex/2 V9786Bcah6eDkV7GTVhLz9730hawhsBaAZlcUpP40QMzQq8+6KhNsJlVRcEaOafpijxA SEsw== X-Gm-Message-State: AOJu0YwUQVztmto81mfgDUJvVMFBvBZ3jEdu/EaJHJLynsCebOQ9VwLI OFQ2MA0bZOjSZvI47E+YLQBZGQ== X-Google-Smtp-Source: AGHT+IEH0fbv1bRtFKIKKyoTGL/I6l3Fqwii2R/ZgxVnTWAbto1aPCgv9Dlpd3dEAg/3snEa1VDymw== X-Received: by 2002:a05:6a00:27a9:b0:6b2:7a88:7128 with SMTP id bd41-20020a056a0027a900b006b27a887128mr10907738pfb.22.1700016281194; Tue, 14 Nov 2023 18:44:41 -0800 (PST) Received: from free.home ([2804:7f1:2080:27a6:3b92:27bb:be38:1ee3]) by smtp.gmail.com with ESMTPSA id e8-20020aa78c48000000b0068be4ce33easm1922985pfd.96.2023.11.14.18.44.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 18:44:40 -0800 (PST) Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id 3AF2iTHH2420124 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 14 Nov 2023 23:44:30 -0300 From: Alexandre Oliva To: Jonathan Wakely Cc: =?utf-8?Q?Fran=C3=A7ois?= Dumont , Jonathan Wakely , "libstdc++" Subject: Re: [PATCH] libstdc++: bvector: undef always_inline macro Organization: Free thinker, does not speak for AdaCore References: <0e2723e5-a60d-484e-b4f4-951bc8dfde8d@gmail.com> Date: Tue, 14 Nov 2023 23:44:29 -0300 In-Reply-To: (Jonathan Wakely's message of "Thu, 9 Nov 2023 20:18:22 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 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. 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