[Bug libstdc++/113807] [performance] bitset::set not using memset opportunity

2024-02-15 Thread rhalbersma at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113807 --- Comment #8 from rhalbersma --- For bitset::operator==, I wonder why (at last in C++20 and later mode) it is not defaulted? For bitset::set and bitset::operator==, I also wonder why the manual loop vs memset/memcmp consteval logic is not

[Bug libstdc++/113807] [performance] bitset::set not using memset opportunity

2024-02-15 Thread rhalbersma at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113807 --- Comment #3 from rhalbersma --- Nice that this is changed now. I noticed a similar optimization could be done for bitset::operator== (more accurately: the helper _M_is_equal) where there is an opportunity to use memcmp, with a similar dance

[Bug libstdc++/113807] New: [performance] bitset::set not using memset opportunity

2024-02-07 Thread rhalbersma at gmail dot com via Gcc-bugs
Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: rhalbersma at gmail dot com Target Milestone: --- Conditionally on is_constant_evaluated() being false, bitset::reset delegate to __builtin_memset(_M_w, 0, _Nw * sizeof(_WordT)) and uses a loop otherwise

[Bug libstdc++/113806] New: [performance] bitset::operator>>= unnecessarily sanitizes the high-word

2024-02-07 Thread rhalbersma at gmail dot com via Gcc-bugs
verity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: rhalbersma at gmail dot com Target Milestone: --- It seems that since time immemorial, bitset::operator>>= unnecessarily sanitizes the high wor

[Bug libstdc++/108260] New: __cpp_lib_ranges_zip feature test macro not defined while std::views::zip is supported

2023-01-01 Thread rhalbersma at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: rhalbersma at gmail dot com Target Milestone: --- I'm a happy user of std::views::zip in gcc-latest but AFAICS the feature test macro __cpp_lib_ranges_zip

[Bug c++/93480] Defaulted <=> doesn't expand array elements

2022-12-26 Thread rhalbersma at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93480 --- Comment #9 from rhalbersma --- Could this fix also be back-ported to gcc 10?

[Bug c++/94924] Default equality operator for C-array compares addresses, not data

2022-12-26 Thread rhalbersma at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94924 --- Comment #4 from rhalbersma --- Is there any chance that this bug fix can be backported to gcc 10 also?

[Bug c++/108214] New: writinng bitset to stringstream fails

2022-12-23 Thread rhalbersma at gmail dot com via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: rhalbersma at gmail dot com Target Milestone: --- #include #include int main() { using T = std::bitset<1>; T a(1); T b; std::stringstream sstr; sstr << a; sstr >> b; } The above progr

[Bug c++/95100] xxx_view adaptors don't work with pipeline operator

2020-05-15 Thread rhalbersma at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95100 --- Comment #2 from rhalbersma --- OK, so the rewriting rules [range.adaptors]/4, that make views::xxx(R) equivalent to R | views::xxx, do not allow to rewrite the expression equivalent xxx_view{R} as R | xxx_view? That would be rather finicky,

[Bug c++/95100] New: xxx_view adaptors don't work with pipeline operator

2020-05-13 Thread rhalbersma at gmail dot com
: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: rhalbersma at gmail dot com Target Milestone: --- Combining the std::ranges::xxx_view adaptors with the pipeline operator does not compile, in contrast to the supposedly expression equivalent std

[Bug c++/94924] Default equality operator for C-array compares addresses, not data

2020-05-12 Thread rhalbersma at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94924 --- Comment #2 from rhalbersma --- OK, Alisdair Meredith points out on Twitter that in [class.compare.default]/6 there is a special sentence on array class data members In that list, any subobject of array type is recursively expanded to the

[Bug c++/94924] Default equality operator for C-array compares addresses, not data

2020-05-12 Thread rhalbersma at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94924 --- Comment #1 from rhalbersma --- I just became aware of [depr.array.comp] in N4861 "Equality and relational comparisons (7.6.10, 7.6.9) between two operands of array type are deprecated." This is very surprising to say the least and

[Bug libstdc++/94933] std::fill_n delegates to __builtin_memset which is not constexpr

2020-05-03 Thread rhalbersma at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94933 --- Comment #2 from rhalbersma --- Sorry, my bad, but that particular overload of __fill_a1 calls __builtin_memset. I was under the impression that this was the reason for the missing constexpr. It would be great if simply adding

[Bug libstdc++/94933] New: std::fill_n delegates to __builtin_memset which is not constexpr

2020-05-03 Thread rhalbersma at gmail dot com
Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: rhalbersma at gmail dot com Target Milestone: --- std::fill_n is constexpr in C++20 but when writing unsigned chars it delegates to __builtin_memset which is not constexpr

[Bug c++/94924] New: Default equality operator for C-array compares addresses, not data

2020-05-02 Thread rhalbersma at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: rhalbersma at gmail dot com Target Milestone: --- It appears that the default op== for a C-array has array-to-pointer decay applied and does not compare the underlying array data

[Bug libstdc++/66059] make_integer_sequence should use a log(N) implementation

2015-12-19 Thread rhalbersma at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66059 --- Comment #14 from rhalbersma --- Ping to get this merged into the upcoming 5.4 release.

[Bug c++/65977] Constexpr should be allowed in declaration of friend template specialization

2015-12-19 Thread rhalbersma at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65977 --- Comment #4 from rhalbersma --- Ping to get this merged into the upcoming 5.4.

[Bug libstdc++/65978] missing constexpr on std::forward_as_tuple and std::tie (LWG issues 2275 and 2301)

2015-12-19 Thread rhalbersma at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65978 --- Comment #3 from rhalbersma --- Ping to get this merged into the upcoming 5.4.

[Bug c++/67371] Never executed "throw" in constexpr function fails to compile

2015-12-19 Thread rhalbersma at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67371 --- Comment #10 from rhalbersma --- Ping to get this merged into the upcoming 5.4 release.

[Bug c++/65985] [5/6 Regression] compiler segfault with assert() in constexpr constructor body

2015-12-19 Thread rhalbersma at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65985 rhalbersma changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|DUPLICATE

[Bug c++/68391] New: -Wsuggest-override does not work on Item 12 of Effective Modern C++

2015-11-17 Thread rhalbersma at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: rhalbersma at gmail dot com Target Milestone: --- Item 12 of Effective Modern C++ contains this example: class Base { public: virtual void mf1() const; virtual void mf2(int x

[Bug libstdc++/66059] make_integer_sequence should use a log(N) implementation

2015-11-16 Thread rhalbersma at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66059 --- Comment #2 from rhalbersma --- Apparently VC and Clang have compiler hooks for this: https://www.reddit.com/r/cpp/comments/3t0nrc/true_story_efficient_packing_tales_of_c/cx26s02

[Bug libstdc++/66059] New: make_integer_sequence should use a log(N) implementation

2015-05-07 Thread rhalbersma at gmail dot com
Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: rhalbersma at gmail dot com Target Milestone: --- The following program fails to compile for g++ 4.9.0 and further #include utility int main

[Bug c++/66026] New: C++14] throw-expression is not a valid constant-expression

2015-05-05 Thread rhalbersma at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: rhalbersma at gmail dot com Target Milestone: --- g++ 5.1.0 and current trunk 20150505 won't compile the following code with -std=c++1y: constexpr auto fun(int n) { switch(n) { case 0

[Bug c++/65977] New: Constexpr should be allowed in declaration of friend template specialization

2015-05-02 Thread rhalbersma at gmail dot com
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: rhalbersma at gmail dot com Target Milestone: --- The following code comes from this StackOverflow QA (note this is not related to std::bitset, it's just a homegrown class

[Bug libstdc++/65978] New: missing constexpr on std::forward_as_tuple and std::tie (LWG issues 2275 and 2301)

2015-05-02 Thread rhalbersma at gmail dot com
Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: rhalbersma at gmail dot com Target Milestone: --- Neither libstdc++ 5.1.0 nor the trunk version implement LWG defect reports 2275 and 2301 that make std::tuple

[Bug c++/65985] compiler segfault with assert() in constexpr constructor body

2015-05-02 Thread rhalbersma at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65985 --- Comment #1 from rhalbersma rhalbersma at gmail dot com --- See also LWG active issue 2234 http://cplusplus.github.io/LWG/lwg-active.html#2234

[Bug c++/65985] New: compiler segfault with assert() in constexpr constructor body

2015-05-02 Thread rhalbersma at gmail dot com
-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: rhalbersma at gmail dot com Target Milestone: --- The following code segfaults with -std=c++1y for g++ 5.1.0 and trunk 20150502 on the combination

[Bug c++/54903] New: Auto + static in-class constant initalization not working

2012-10-11 Thread rhalbersma at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54903 Bug #: 54903 Summary: Auto + static in-class constant initalization not working Classification: Unclassified Product: gcc Version: 4.7.2 Status: