On Thu, 29 Aug 2024 at 09:12, Dhruv Chawla <dhr...@nvidia.com> wrote:
>
> On 28/08/24 15:40, Jonathan Wakely wrote:
> > External email: Use caution opening links or attachments
> >
> >
> > On Wed, 28 Aug 2024 at 06:47, Dhruv Chawla <dhr...@nvidia.com> wrote:
> >>
> >> version.syn#2 requires <string> to define
> >> __cpp_lib_allocator_traits_is_always_equal.
> >>
> >> The attached patch therefore defines the
> >> __glibcxx_want_allocator_traits_is_always_equal macro to get the
> >> definition of the feature-test macro from <bits/version.h>.
> >>
> >> This is not isolated only to <string> though. The standard requires the
> >> following (as per version.syn#2):
> >>
> >> #define __cpp_lib_allocator_traits_is_always_equal  201411L
> >>     // freestanding, also in <memory>, <scoped_allocator>, <string>, 
> >> <deque>,
> >>     // <forward_list>, <list>, <vector>, <map>, <set>, <unordered_map>,
> >>     // <unordered_set>
> >>
> >> After fixing <string>, all the above headers except <memory> still fail to
> >> define the macro. Should similar fixes be created for these headers as 
> >> well?
> >
> > Yes please, this is a regression since GCC 13. It was previously
> > defined in <bits/alloc_traits.h> which is included by all the headers
> > above. In GCC 14 we changed how we define feature test macros, and we
> > accidentally stopped defining it in all those headers.
> >
>
> I have updated the headers now, please have a look.
>
> Bootstrapped and regtested on aarch64-linux-gnu.

Tests added for all headers, regtested successfully, DCO sign-off
present - this looks great, thanks.

I'll push it to trunk and gcc-14.


>
> >>
> >> Signed-off-by: Dhruv Chawla <dhr...@nvidia.com>
> >>
> >> --
> >> Regards,
> >> Dhruv
> >
>
> --
> Regards,
> Dhruv

Reply via email to