From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by sourceware.org (Postfix) with ESMTPS id 1B38C3858D1E for ; Thu, 28 Apr 2022 19:57:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1B38C3858D1E Received: by mail-wr1-x434.google.com with SMTP id u3so8153848wrg.3 for ; Thu, 28 Apr 2022 12:57:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=tTH9WSfMtI0dYr7FPZavUXT3lUOKu7Ax1dFytzkqSFM=; b=XVyG02hwxJ3TqqP2JENK03gTKBInl/rihE0+Bb77IihExODq/zu71lq4st5i2cKJsm 6eyDwiQnkKqpknLzNSi+bUS+iocKmazqMaypl7vFayDwCMVXJx7Hpu1qyFZHBkoLhv5l o6yK8G6CE/tr2WLjShfcQs8l402bcSJdtdFxtlHzuFMRF9lcvZKcsAvTu2Cv8CQEY9VT Q280qfdncJlw87qyPLb1YSeWYuw4//5LwIOpHfkVLExOPyGIuM+scSMEAPSZZQj/045A Q7iGefBTUfmVNB4X5+WkfWLMLjE2dTxBAEUc/bzVVfMoZ/vJPPnk1GGlVh+zOstzIL+Q 34+w== X-Gm-Message-State: AOAM531bWNuMsbvQnXLkkoWyNM7fwi6X+KMORwVTEBbDpSgRO+Q4PepT vuap8p8E4NPCdNf99n227SQ= X-Google-Smtp-Source: ABdhPJwz+8gTQj9rwgaAIa7yT4h+yXNZ45u38/HTFof10syLfquYKRseGbm50RJ3suGZVyIUcVUiYg== X-Received: by 2002:a05:6000:1b0e:b0:20a:deb9:ea39 with SMTP id f14-20020a0560001b0e00b0020adeb9ea39mr16178443wrz.393.1651175861785; Thu, 28 Apr 2022 12:57:41 -0700 (PDT) Received: from ?IPV6:2a01:e0a:1dc:b1c0:4de7:3f8b:96e2:1a87? ([2a01:e0a:1dc:b1c0:4de7:3f8b:96e2:1a87]) by smtp.googlemail.com with ESMTPSA id k11-20020a5d6d4b000000b0020599079f68sm602205wri.106.2022.04.28.12.57.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 28 Apr 2022 12:57:41 -0700 (PDT) Message-ID: <747b9b36-d4b5-0859-8809-21f3dd8796fb@gmail.com> Date: Thu, 28 Apr 2022 21:57:40 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH][_GLIBCXX_INLINE_VERSION] Fix std::random_device definition Content-Language: fr To: Jonathan Wakely Cc: "libstdc++@gcc.gnu.org" References: From: =?UTF-8?Q?Fran=c3=a7ois_Dumont?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Apr 2022 19:57:45 -0000 On 28/04/22 11:35, Jonathan Wakely wrote: > On Thu, 28 Apr 2022 at 05:56, François Dumont via Libstdc++ > wrote: >> Hi >> >> Still time for this fix for gcc 12 ? > What needs fixing? > > std::random_device is already declared in the versioned namespace in > : Oh, I thought it was necessary because it is what is done in most if not all the other sources in src. I might do a cleanup as part of the patch to adopt the cxx11 abi std::string in the _GLIBCXX_INLINE_VERSION mode. > > namespace std _GLIBCXX_VISIBILITY(default) > { > _GLIBCXX_BEGIN_NAMESPACE_VERSION > ... > /** > * A standard interface to a platform-specific non-deterministic > * random number generator (if any are available). > */ > class random_device > { > > So that means the definitions of its member functions will be exported > as std::__8::random_device::* already, the macros are not needed in > the src/*/*.cc files. > > So it seems to me that the only "problem" is a redundant line in > config/abi/pre/gnu-versioned-namespace.ver. That line has no effect, > and can be removed. > > I've pushed the attached patch instead. > >> If so I'll make sure to run tests quickly, especially the abi.exp >> one to confirm that the cleanup in gnu-versioned-namespace.ver do not >> need to be replaced by the same in __8 namespace. >> >> libstdc++: [_GLIBCXX_INLINE_VERSION] Fix std::random_device definition >> >> Definition shall be put in _GLIBCXX_BEGIN_VERSION_NAMESPACE/ >> _GLIBCXX_END_VERSION_NAMESPACE like the declaration. >> >> libstdc++-v3/ChangeLog >> >> * src/c++11/cow-string-inst.cc: Put random_device member definitions >> in versioned namespace. >> * src/c++11/random.cc: Likewise. >> * config/abi/pre/gnu-versioned-namespace.ver: Remove std::random_device >> symbols. >> >> François