[Bug libstdc++/121180] std::any allows for creating multiple empty objects of the same type at the same address

2025-07-20 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121180 --- Comment #5 from Jonathan Wakely --- struct Empty { }; struct S : Empty { char buf[1]; }; int main() { S s; new (s.buf) Empty; } Isn't this exactly the same?

[Bug libstdc++/121148] Should use modular arithmetic for _Atomic_word

2025-07-18 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121148 Jonathan Wakely changed: What|Removed |Added Keywords||patch --- Comment #15 from Jonathan W

[Bug libstdc++/102181] [DR 3197] std::advance and std::views::iota don't work

2025-07-18 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102181 Jonathan Wakely changed: What|Removed |Added Keywords||patch --- Comment #10 from Jonathan W

[Bug libstdc++/71945] Integer overflow in use counter of shared pointers

2025-07-18 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71945 --- Comment #7 from Jonathan Wakely --- And the original code from comment 0 now does: $ ./a.out 1) Create an object and pass it over to a shared pointer... ptr.use_count() -> 1 2) Create an extra reference to that object... ptr.use_count(

[Bug libstdc++/121148] Should use modular arithmetic for _Atomic_word

2025-07-18 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121148 --- Comment #14 from Jonathan Wakely --- OK great, thanks all. I have a patch ready that flips the non-inline atomics to use -fwrapv and fixes the handful of inline ones to avoid signed overflow.

[Bug testsuite/121150] FAIL: 20_util/hash/int128.cc -std=c++17 execution test

2025-07-18 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121150 Jonathan Wakely changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug bootstrap/121147] ../.././gcc/c/c-decl.cc:6192:21: error: ‘ENABLE_OFFLOADING’ was not declared in this scope

2025-07-18 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121147 --- Comment #12 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #3) > As it says at https://gcc.gnu.org/wiki/InstallingGCC "If your build fails > and your configure command has lots of complicated options you should try > remo

[Bug testsuite/121150] FAIL: 20_util/hash/int128.cc -std=c++17 execution test

2025-07-18 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121150 --- Comment #7 from Jonathan Wakely --- (In reply to Tomasz Kamiński from comment #6) > What about doing: > __uint128 u = 0x1; > u <<= 32u; > u |= 0x2345; > u <<= 32u; > u |= 0x6789; > __int128 i = u; There's no problem forming the constant 0x1

[Bug testsuite/121150] FAIL: 20_util/hash/int128.cc -std=c++17 execution test

2025-07-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121150 --- Comment #3 from Jonathan Wakely --- --- a/libstdc++-v3/testsuite/20_util/hash/int128.cc +++ b/libstdc++-v3/testsuite/20_util/hash/int128.cc @@ -9,12 +9,12 @@ int main() #ifdef __SIZEOF_INT128__ std::hash<__int128> h; __int128 i = (__i

[Bug testsuite/121150] FAIL: 20_util/hash/int128.cc -std=c++17 execution test

2025-07-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121150 --- Comment #5 from Jonathan Wakely --- Also, those C macros are ugly and unnecessary in C++ :)

[Bug testsuite/121150] FAIL: 20_util/hash/int128.cc -std=c++17 execution test

2025-07-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121150 --- Comment #4 from Jonathan Wakely --- (In reply to H.J. Lu from comment #2) > + __int128 i = (__int128)INT64_C(0x123456789); This doesn't do anything, it's already a signed 64-bit value. The problem is that h(__i) truncates it to 32-bit siz

[Bug testsuite/121150] FAIL: 20_util/hash/int128.cc -std=c++17 execution test

2025-07-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121150 --- Comment #1 from Jonathan Wakely --- There is no long anywhere here. The problem is that size_t is 32 bits, and using an INT64 suffix won't change that: the value will still be too large for size_t. I'll fix it by using a different value for

[Bug testsuite/121150] FAIL: 20_util/hash/int128.cc -std=c++17 execution test

2025-07-17 Thread redi at gcc dot gnu.org via Gcc-bugs
|--- |16.0 Ever confirmed|0 |1 Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org Status|UNCONFIRMED |ASSIGNED

[Bug libstdc++/121148] Should use modular arithmetic for _Atomic_word

2025-07-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121148 --- Comment #9 from Jonathan Wakely --- Ha yes, my patch uses -fwrapv, it's just a typo :) --- a/libstdc++-v3/libsupc++/Makefile.am +++ b/libstdc++-v3/libsupc++/Makefile.am @@ -132,6 +132,11 @@ atomicity_file = ${glibcxx_srcdir}/$(ATOMICITY_SRC

[Bug libstdc++/71945] Integer overflow in use counter of shared pointers

2025-07-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71945 --- Comment #6 from Jonathan Wakely --- Simpler reproducer which fails the assertion with trunk when the ref count overflows to INT_MIN, but which passes with my local patches: #include #include #include int main() { std::shared_ptr p(new

[Bug libstdc++/121148] Should use modular arithmetic for _Atomic_word

2025-07-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121148 --- Comment #7 from Jonathan Wakely --- Nearly all the plain C++ code can be fixed just by compiling it with -ftrapv, there's only one inline function where we can't control the compiler flags the user uses. So only that place needs to change (i

[Bug libstdc++/121148] Should use modular arithmetic for _Atomic_word

2025-07-17 Thread redi at gcc dot gnu.org via Gcc-bugs
|ASSIGNED Last reconfirmed||2025-07-17 Target Milestone|--- |16.0 Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org

[Bug libstdc++/71945] Integer overflow in use counter of shared pointers

2025-07-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71945 --- Comment #5 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #3) > The __atomic_fetch_add built-in on signed integers is required to wrap like > unsigned integers without UB, but we should check that all our > target-specific

[Bug libstdc++/121148] Should use modular arithmetic for _Atomic_word

2025-07-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121148 Jonathan Wakely changed: What|Removed |Added CC||joel at gcc dot gnu.org --- Comment #

[Bug libstdc++/121148] Should use modular arithmetic for _Atomic_word

2025-07-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121148 Jonathan Wakely changed: What|Removed |Added CC||ro at gcc dot gnu.org --- Comment #5

[Bug libstdc++/121148] Should use modular arithmetic for _Atomic_word

2025-07-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121148 Jonathan Wakely changed: What|Removed |Added CC||schwab at gcc dot gnu.org --- Comment

[Bug libstdc++/121148] Should use modular arithmetic for _Atomic_word

2025-07-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121148 Jonathan Wakely changed: What|Removed |Added CC||uros at gcc dot gnu.org --- Comment #

[Bug libstdc++/121148] Should use modular arithmetic for _Atomic_word

2025-07-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121148 Jonathan Wakely changed: What|Removed |Added CC||danglin at gcc dot gnu.org --- Commen

[Bug libstdc++/121148] Should use modular arithmetic for _Atomic_word

2025-07-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121148 --- Comment #1 from Jonathan Wakely --- We also have handwritten assembly versions which need to be checked by target maintainers: libstdc++-v3/config/cpu/cris/atomicity.h has three different assembly implementations of __exchange_and add I th

[Bug libstdc++/121148] New: Should use modular arithmetic for _Atomic_word

2025-07-17 Thread redi at gcc dot gnu.org via Gcc-bugs
: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Blocks: 71945 Target Milestone: --- The std::atomic::fetch_xxx members are required to never overflow: Remarks: [...] for signed integer types the result is as if the object value

[Bug c++/121147] ../.././gcc/c/c-decl.cc:6192:21: error: ‘ENABLE_OFFLOADING’ was not declared in this scope

2025-07-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121147 --- Comment #3 from Jonathan Wakely --- (In reply to terryinzaghi from comment #0) > ../gcc-15.1.0/configure \ > --prefix=/home/cu-lib/GCC15/gcc15-installed \ > --enable-languages=c,c++ \ > --enable-bootstrap \ > --enable-checking=relea

[Bug c++/121147] ../.././gcc/c/c-decl.cc:6192:21: error: ‘ENABLE_OFFLOADING’ was not declared in this scope

2025-07-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121147 Jonathan Wakely changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED

[Bug libstdc++/121141] std::shared_timed_mutex::try_lock_until causes assertion failure with negative timepoint

2025-07-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121141 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug libstdc++/116586] All uses of absolute timeouts should correctly handle negative times

2025-07-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116586 Jonathan Wakely changed: What|Removed |Added CC||dhruvc at nvidia dot com --- Comment

[Bug libstdc++/71945] Integer overflow in use counter of shared pointers

2025-07-16 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71945 --- Comment #4 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #3) > The __atomic_fetch_add built-in on signed integers is required to wrap like > unsigned integers without UB, but we should check that all our > target-specific

[Bug libstdc++/71945] Integer overflow in use counter of shared pointers

2025-07-16 Thread redi at gcc dot gnu.org via Gcc-bugs
gcc dot gnu.org |redi at gcc dot gnu.org Status|NEW |ASSIGNED --- Comment #3 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #2) > We should terminate if the counter reaches its maximum value. That would mean changing f

[Bug libstdc++/121114] Decide how to deal with throwing exceptions during constant evaluation

2025-07-16 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121114 --- Comment #5 from Jonathan Wakely --- (In reply to Jakub Jelinek from comment #4) > BTW, does the standard require that in all standard headers where these > exceptions can be thrown the corresponding exception types have to be > defined, No

[Bug c++/121055] [15/16 Regression] __is_invocable built-in doesn't match std::invoke for rvalue-ref qualified member function

2025-07-16 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121055 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug libstdc++/106477] With -fno-exception operator new(nothrow) aborts instead of returning null

2025-07-16 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106477 Jonathan Wakely changed: What|Removed |Added Target Milestone|--- |16.0

[Bug libstdc++/121114] New: Decide how to deal with throwing exceptions during constant evaluation

2025-07-16 Thread redi at gcc dot gnu.org via Gcc-bugs
Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- For C++26 we can throw and catch exceptions during constant evaluation, but our current solution for throwing in e.g. std

[Bug libstdc++/121097] hypot uses __promoted_t even when __cpp_fold_expressions is not defined

2025-07-15 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121097 Jonathan Wakely changed: What|Removed |Added Keywords||patch --- Comment #6 from Jonathan Wa

[Bug libstdc++/121097] hypot uses __promoted_t even when __cpp_fold_expressions is not defined

2025-07-15 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121097 --- Comment #5 from Jonathan Wakely --- Sure, we could do, but I'm not convinced it's a real issue, only a hypothetical one. Your config seems self-inflicted, due to an incomplete emulation of GCC 10 (which did define __cpp_fold_expressions).

[Bug libstdc++/121097] hypot uses __promoted_t even when __cpp_fold_expressions is not defined

2025-07-15 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121097 --- Comment #3 from Jonathan Wakely --- (In reply to Arthur O'Dwyer from comment #1) > Er, PC-Lint 2.0 with a config file that *we* made to roughly emulate GCC 10, > apparently. I can't blame PC-Lint itself for the weird setting of these > macro

[Bug libstdc++/121097] hypot uses __promoted_t even when __cpp_fold_expressions is not defined

2025-07-15 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121097 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0

[Bug libstdc++/108409] std::chrono::current_zone() doesn't work on AIX

2025-07-15 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108409 Jonathan Wakely changed: What|Removed |Added Target|*-*aix* *-*-mingw* |*-*aix* Summary|std::chron

[Bug libstdc++/121071] New: std::hash<__int128> and std::hash ignore bits >= SIZE_WIDTH

2025-07-14 Thread redi at gcc dot gnu.org via Gcc-bugs
ords: ABI Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- For all integer types std::hash just returns the original value:

[Bug libstdc++/121053] std::visit is not SFINAE-friendly

2025-07-13 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121053 --- Comment #2 from Jonathan Wakely --- Neither form is constrained in the standard. With libstdc++ std::visit is SFINAE-friendly and std::visit is not. With libc++ both are SFINAE-friendly.

[Bug c++/121055] New: [15/16 Regression] __is_invocable built-in doesn't match std::invoke for rvalue-ref qualified member function

2025-07-13 Thread redi at gcc dot gnu.org via Gcc-bugs
rsion: 15.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- #include struct F { void operator()() && { } }; templ

[Bug libstdc++/121052] Audit all uses of the nonnull attribute in libstdc++

2025-07-13 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121052 --- Comment #1 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #0) > Many of our uses of the nonnull attribute are probably bugs, e.g. > > polymorphic_allocator(memory_resource* __r) noexcept > __attribute__((__no

[Bug libstdc++/121054] New: std::bitset<0>("zero") should throw std::invalid_argument

2025-07-13 Thread redi at gcc dot gnu.org via Gcc-bugs
ords: wrong-code Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- The standard requires that all of the bitset constructors taking a string check the whole

[Bug libstdc++/121053] New: std::visit is not SFINAE-friendly

2025-07-13 Thread redi at gcc dot gnu.org via Gcc-bugs
: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- I don't think this is required by the standard, but it works for the std::visit case, just not std::visit #include template concept visitable = requires(Visitor

[Bug c++/86878] G++ should warn about invalid alignments passed to allocation functions

2025-07-13 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86878 Jonathan Wakely changed: What|Removed |Added Last reconfirmed|2024-01-09 00:00:00 |2025-7-13 See Also|

[Bug libstdc++/121052] New: Audit all uses of the nonnull attribute in libstdc++

2025-07-13 Thread redi at gcc dot gnu.org via Gcc-bugs
Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Depends on: 110617 Target Milestone: --- Many of our uses of the nonnull attribute are probably bugs, e.g. polymorphic_allocator(memory_resource* __r) noexcept

[Bug middle-end/110617] RFE: Add a diagnostic-only variant of nonnull attribute

2025-07-13 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110617 Jonathan Wakely changed: What|Removed |Added CC||redi at gcc dot gnu.org

[Bug c++/86568] -Wnonnull warnings should highlight the relevant argument not the closing parenthesis

2025-07-13 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86568 Jonathan Wakely changed: What|Removed |Added Last reconfirmed|2020-06-03 00:00:00 |2025-7-13 --- Comment #13 from Jonatha

[Bug libstdc++/86015] Better handling of iterator distances

2025-07-12 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86015 --- Comment #16 from Jonathan Wakely --- The standard relaxed the rules slightly for iterator difference types, to permit integer-class types to be used as difference types (see [iterator.concept.winc]). However, those integer-class types are imp

[Bug libstdc++/119742] [C++26] Implement P2697R1, Interfacing bitset with string_view

2025-07-12 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119742 --- Comment #5 from Jonathan Wakely --- Also, do we want to make this change? --- a/libstdc++-v3/include/std/bitset +++ b/libstdc++-v3/include/std/bitset @@ -720,7 +720,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER namespace __bitset { -#if _

[Bug libstdc++/121046] Asking is_constructible_v, NonTrivial*> is ill-formed

2025-07-12 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121046 --- Comment #3 from Jonathan Wakely --- https://cplusplus.github.io/LWG/issue4294

[Bug libstdc++/121046] Asking is_constructible_v, NonTrivial*> is ill-formed

2025-07-12 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121046 --- Comment #2 from Jonathan Wakely --- I think we should open a library issue to add a constraint to the standard.

[Bug libstdc++/121046] New: Asking is_constructible_v, NonTrivial*> is ill-formed

2025-07-12 Thread redi at gcc dot gnu.org via Gcc-bugs
lid Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- Found by the libc++ testsuite: #include struct NonTrivial { ~NonTrivial() { } }; static_assert( !

[Bug libstdc++/121046] Asking is_constructible_v, NonTrivial*> is ill-formed

2025-07-12 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121046 Jonathan Wakely changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org

[Bug libstdc++/102181] [DR 3197] std::advance and std::views::iota don't work

2025-07-12 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102181 Jonathan Wakely changed: What|Removed |Added Status|SUSPENDED |ASSIGNED Target Milestone|---

[Bug libstdc++/106610] elements_view::iterator::iterator_category invokes the operator*() && of the underlying iterator

2025-07-12 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106610 --- Comment #1 from Jonathan Wakely --- Isn't this invalid because of [concepts.equality] p6? The indirectly_readable concept requires that *it works on a const lvalue, which means it has to behave the same on lvalues and rvalues or the same ty

[Bug libstdc++/117998] : views::counted misses difference casting for contiguous_iterator case

2025-07-12 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117998 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug libstdc++/114477] The user-defined constructor of filter_view::iterator is not fully compliant with the standard

2025-07-12 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114477 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |SUSPENDED Last reconfirmed|

[Bug libstdc++/90919] vector::iterator is constructible from a pointer

2025-07-12 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90919 Jonathan Wakely changed: What|Removed |Added Last reconfirmed|2020-01-28 00:00:00 |2025-7-12 --- Comment #2 from Jonathan

[Bug libstdc++/88374] crash when stepping into for loop where iterators are created and compared with gdb

2025-07-12 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88374 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/117785] [C++26] P3068R5 - constexpr exceptions

2025-07-11 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117785 --- Comment #38 from Jonathan Wakely --- I'll fix that, thanks.

[Bug c++/117785] [C++26] P3068R5 - constexpr exceptions

2025-07-11 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117785 --- Comment #32 from Jonathan Wakely --- (In reply to Hana Dusíková from comment #28) > (In reply to Jakub Jelinek from comment #27) > > Jason Merrill asked for that during patch review: > > https://gcc.gnu.org/pipermail/gcc-patches/2025-July/68

[Bug target/120866] [16 Regression] pdp11-aout, powerpc-ibm-aix7.1 and powerpc-ibm-aix7.2 crosscompilers fail to build

2025-07-11 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120866 --- Comment #6 from Jonathan Wakely --- So how should this be fixed?

[Bug libstdc++/13823] Significant performance issue with std::map on multiple threads on dual processor - possibly default allocator

2025-07-11 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=13823 Jonathan Wakely changed: What|Removed |Added Resolution|--- |FIXED Status|SUSPENDED

[Bug libstdc++/119754] std::uninitialized_value_construct does not begin lifetime of trivial types

2025-07-11 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119754 Jonathan Wakely changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug libstdc++/117822] [C++23] basic_stacktrace allocator-extended move constructor uses _Allocator instead of _AllocTraits

2025-07-11 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117822 Jonathan Wakely changed: What|Removed |Added Resolution|--- |FIXED Target Milestone|---

[Bug libstdc++/120997] [15 Regression] std::span::subspan returns initializer list

2025-07-11 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120997 --- Comment #6 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #4) > Thanks for submitting the issue! I'll add the link here once it gets created. https://cplusplus.github.io/LWG/issue4293

[Bug libstdc++/120997] [15 Regression] std::span::subspan returns initializer list

2025-07-11 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120997 Jonathan Wakely changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug libstdc++/120305] Cannot create a std::vector from a std::ranges::transform_view.

2025-07-11 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120305 Bug 120305 depends on bug 96710, which changed state. Bug 96710 Summary: __int128 vs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96710 What|Removed |Added -

[Bug libstdc++/96710] __int128 vs

2025-07-11 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96710 Jonathan Wakely changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug tree-optimization/56456] [meta-bug] bogus/missing -Warray-bounds

2025-07-11 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56456 Bug 56456 depends on bug 110498, which changed state. Bug 110498 Summary: [12 Regression] Spurious warnings stringop-overflow and array-bounds copying data as bytes into vector::reserve https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110498

[Bug libstdc++/110498] [12 Regression] Spurious warnings stringop-overflow and array-bounds copying data as bytes into vector::reserve

2025-07-11 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110498 Jonathan Wakely changed: What|Removed |Added Status|ASSIGNED|RESOLVED Target Milestone|12.5

[Bug tree-optimization/88443] [meta-bug] bogus/missing -Wstringop-overflow warnings

2025-07-11 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88443 Bug 88443 depends on bug 110498, which changed state. Bug 110498 Summary: [12 Regression] Spurious warnings stringop-overflow and array-bounds copying data as bytes into vector::reserve https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110498

[Bug libstdc++/121026] ranges::uninitialized_xxx algos perform invalid optimizations

2025-07-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121026 --- Comment #2 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #0) > Fourthly, I don't think this ranges::uninitialized_move optimization is > valid: > > auto [__in, __out] > = ranges::copy_n(std::make_m

[Bug libstdc++/121026] ranges::uninitialized_xxx algos perform invalid optimizations

2025-07-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121026 --- Comment #1 from Jonathan Wakely --- We could also take the opportunity to look into whether any of those optimizations still buy us much performance. Is the compiler smart enough to turn the default implementation (in terms of a loop) into m

[Bug libstdc++/119754] std::uninitialized_value_construct does not begin lifetime of trivial types

2025-07-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119754 --- Comment #11 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #10) > However, ranges::uninitialized_value_construct has the same bug as > std::uninitialized_value_construct and wasn't fixed by my recent commit (but > I do ha

[Bug libstdc++/121026] New: ranges::uninitialized_xxx algos perform invalid optimizations

2025-07-10 Thread redi at gcc dot gnu.org via Gcc-bugs
Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- Firstly, the _DestroyGuard is a no-op for trivially destructible types: template requires

[Bug libstdc++/121024] ranges::destroy and ranges::destroy_n do not end lifetime of trivial types

2025-07-10 Thread redi at gcc dot gnu.org via Gcc-bugs
|UNCONFIRMED |ASSIGNED Ever confirmed|0 |1 Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org

[Bug libstdc++/119754] std::uninitialized_value_construct does not begin lifetime of trivial types

2025-07-10 Thread redi at gcc dot gnu.org via Gcc-bugs
|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org --- Comment #10 from Jonathan Wakely --- However, ranges::uninitialized_value_construct has the same bug as std::uninitialized_value_construct and wasn't fixed by my recent commit (but I do have a fix in my local tree).

[Bug libstdc++/119754] std::uninitialized_value_construct does not begin lifetime of trivial types

2025-07-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119754 --- Comment #9 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #8) > (In reply to Jiang An from comment #6) > > It seems that algorithms in std properly destroy trivially destructible > > objects, but those in std::ranges don'

[Bug libstdc++/121024] New: ranges::destroy and ranges::destroy_n do not end lifetime of trivial types

2025-07-10 Thread redi at gcc dot gnu.org via Gcc-bugs
: accepts-invalid Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org CC: daniel.kruegler at googlemail dot com, de34 at live dot cn, tkaminsk

[Bug c++/102284] Can access object outside of its lifetime during constant evaluation

2025-07-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102284 Jonathan Wakely changed: What|Removed |Added Blocks||110367 --- Comment #9 from Jonathan W

[Bug libstdc++/119754] std::uninitialized_value_construct does not begin lifetime of trivial types

2025-07-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119754 --- Comment #8 from Jonathan Wakely --- (In reply to Jiang An from comment #6) > It seems that algorithms in std properly destroy trivially destructible > objects, but those in std::ranges don't. Isn't this a completely separate bug?

[Bug analyzer/106390] Support gsl::owner and/or [[gnu::owner]] attribute in -fanalyzer

2025-07-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106390 --- Comment #7 from Jonathan Wakely --- Related: https://discourse.llvm.org/t/rfc-lifetime-annotations-for-c/61377

[Bug libstdc++/119754] std::uninitialized_value_construct does not begin lifetime of trivial types

2025-07-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119754 --- Comment #7 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #0) > #include > #include > > consteval bool f(int n) > { > int* p = std::allocator().allocate(n); > std::uninitialized_value_construct(p, p+n); > std::al

[Bug c++/121021] Move -Wuninitialized from -Wextra to -Wall

2025-07-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121021 --- Comment #7 from Jonathan Wakely --- (In reply to Žarko Asen from comment #5) > in my case (C++ 20) -Wunitialized was not enabled by -Wall therefore a > critical bug slip through: > > const uint32_t x = x + 1; // where is a novel variable in

[Bug c++/121021] Move -Wuninitialized from -Wextra to -Wall

2025-07-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121021 --- Comment #6 from Jonathan Wakely --- (In reply to Andrew Pinski from comment #3) > Hmm, I do think there is a documentation issue though it says -Wextra > enables -Wuninitialized but it is -Wall that does. Right, -Wextra clearly documents th

[Bug tree-optimization/104547] std::vector::resize(v.size() - n) produces poor code

2025-07-09 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104547 --- Comment #13 from Jonathan Wakely --- This test fails with this proposed patch: https://gcc.gnu.org/pipermail/gcc-patches/2025-July/689128.html

[Bug libstdc++/110339] Implement C++26 library features

2025-07-09 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110339 Bug 110339 depends on bug 117403, which changed state. Bug 117403 Summary: [C++26] Implement P1901R2 Enabling the Use of weak_ptr as Keys in Unordered Associative Containers https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117403 What

[Bug libstdc++/117403] [C++26] Implement P1901R2 Enabling the Use of weak_ptr as Keys in Unordered Associative Containers

2025-07-09 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117403 Jonathan Wakely changed: What|Removed |Added Resolution|--- |FIXED Target Milestone|---

[Bug libstdc++/120997] std::span::subspan returns initializer list

2025-07-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120997 --- Comment #4 from Jonathan Wakely --- Thanks for submitting the issue! I'll add the link here once it gets created.

[Bug libstdc++/120997] std::span::subspan returns initializer list

2025-07-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120997 --- Comment #3 from Jonathan Wakely --- Yeah we have a defect in the C++26 draft, which needs to be fixed.

[Bug libstdc++/120997] std::span::subspan returns initializer list

2025-07-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120997 --- Comment #2 from Jonathan Wakely --- The libstdc++ implementation follows the C++26 draft standard exactly: Effects: Equivalent to: return {data(), count}; So maybe we need to fix that.

[Bug libstdc++/120997] std::span::subspan returns initializer list

2025-07-08 Thread redi at gcc dot gnu.org via Gcc-bugs
|1 Last reconfirmed||2025-07-08 Target Milestone|--- |15.2 Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org --- Comment #1 from Jonathan Wakely --- This fixes it: --- a/libstdc++-v3

[Bug libstdc++/110339] Implement C++26 library features

2025-07-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110339 Bug 110339 depends on bug 120364, which changed state. Bug 120364 Summary: std::bitset is missing hardened preconditions https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120364 What|Removed |Added -

[Bug libstdc++/118341] Missing -D_GLIBCXX_ASSERTIONS checks for

2025-07-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118341 Jonathan Wakely changed: What|Removed |Added Blocks||110339 --- Comment #6 from Jonathan W

[Bug libstdc++/118341] Missing -D_GLIBCXX_ASSERTIONS checks for

2025-07-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118341 Jonathan Wakely changed: What|Removed |Added CC||redi at gcc dot gnu.org --- Comment

[Bug libstdc++/120364] std::bitset is missing hardened preconditions

2025-07-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120364 Jonathan Wakely changed: What|Removed |Added Resolution|--- |DUPLICATE Status|UNCONFIR

  1   2   3   4   5   6   7   8   9   10   >