This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR libstdc++/81064 fix versioned namespace


Here is the revisited version passing all tests successfully except 2 that are also failing without the patch:
FAIL: 21_strings/basic_string/modifiers/insert/char/1.cc execution test
FAIL: 21_strings/basic_string/modifiers/insert/wchar_t/1.cc execution test

This is a rather mechanical change except for few files I would like to comment on:
- include/bits/c++config
I removed many declaration of namespace that are not necessary as we don't need to declare any nested inline namespace anymore. In this last version I managed to isolate the versioned namespace value to a single location: the definition of _GLIBCXX_BEGIN_VERSION_NAMESPACE. After the patch it is the only location of this version information so next bump will be resume to updating c++config apart from python and build scripts.

Note that the PR seems to say that the namespace should be always declared the same way. In this patch __8 is declared inline only in c++config, _GLIBCXX_BEGIN_VERSION_NAMESPACE don't repeat the inline keyword.

- include/bits/regex.h
- include/std/variant

    In those 2 files we were having:
       friend bool __detail::
#if _GLIBCXX_INLINE_VERSION
        __8:: // Required due to PR c++/59256
#endif
    ...

I don't know if the front end change was to fix c++/59256 or if it is due to the new namespace organization but I removed this code and tests are successful. They were of course failing because there is no more __detail::__8.

I am now ready to commit. I'll do it this week-end if I have no further feedback.

François


Attachment: versioned_namespace.patch.bz2
Description: application/bzip


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]