[Bug middle-end/119576] Please remove -Warray-bounds from -Wall

2025-04-01 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119576 --- Comment #8 from Arthur O'Dwyer --- The Linux kernel disables -Warray-bounds in GCC 9 and later (and -Wstringop-overflow unconditionally). https://github.com/openSUSE/kernel/blame/5be5ecdaf1e7fb1a04e6122771b432851cd2393d/init/Kconfig#L905-L92

[Bug middle-end/119576] Please remove -Warray-bounds from -Wall

2025-04-01 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119576 --- Comment #6 from Arthur O'Dwyer --- Will Wray points out that GCC's own codebase disables `-Warray-bounds` in several places, including at least these places in current master: gcc/cp/module.cc:#pragma GCC diagnostic ignored "-Warray-bounds"

[Bug driver/119576] New: Please remove -Warray-bounds from -Wall

2025-04-01 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119576 Bug ID: 119576 Summary: Please remove -Warray-bounds from -Wall Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: drive

[Bug c++/119497] Improve diagnostic for failed assert(expr) in constexpr context

2025-03-27 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119497 --- Comment #7 from Arthur O'Dwyer --- > @jwakely is correct that on OSX/Darwin the macro is named `__assert_rtn`. ...er, sorry, the *non-constexpr function called by the `assert` macro* is named `__assert_rtn`.

[Bug c++/119497] Improve diagnostic for failed assert(expr) in constexpr context

2025-03-27 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119497 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com ---

[Bug libstdc++/111351] constexpr std::string objects permitted to escape constant evaluation when SSO

2025-03-25 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111351 --- Comment #10 from Arthur O'Dwyer --- > > Would it be at least possible to make the error clearer? > I don't think that's possible to do in the library. Agreed. IMO this bug should be marked RESOLVED at this point, because James Knight's pat

[Bug libstdc++/109941] [feat req] Add an option to mark STL types as nodiscard

2025-03-10 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109941 --- Comment #7 from Arthur O'Dwyer --- I've split out the `std::expected` feature request specifically into bug #119197.

[Bug libstdc++/119197] New: [feat req] `std::expected` should be nodiscard

2025-03-10 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119197 Bug ID: 119197 Summary: [feat req] `std::expected` should be nodiscard Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component

[Bug c++/116866] RFE: warn about suspected missing "throw" when discarding temporaries that inherit from std::exception

2025-03-10 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116866 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com ---

[Bug c++/102116] structured binding is returned from a function as rvalue in C++20 mode

2025-02-06 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102116 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com ---

[Bug libstdc++/118647] Missed optimization to do memcpy/memmove for contiguous iterator

2025-01-26 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118647 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com ---

[Bug libstdc++/118293] New: Inserting at front of an empty deque shouldn't need to allocate

2025-01-04 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118293 Bug ID: 118293 Summary: Inserting at front of an empty deque shouldn't need to allocate Product: gcc Version: 14.2.0 Status: UNCONFIRMED Severity: normal

[Bug libstdc++/118209] New: ranges::sort doesn't use iter_move, cannot sort zip of move-only type

2024-12-26 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118209 Bug ID: 118209 Summary: ranges::sort doesn't use iter_move, cannot sort zip of move-only type Product: gcc Version: 14.2.0 Status: UNCONFIRMED Severity: normal

[Bug c++/118139] New: Broken diagnostic: 'decltype_type' not supported by pp_cxx_unqualified_id

2024-12-19 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118139 Bug ID: 118139 Summary: Broken diagnostic: 'decltype_type' not supported by pp_cxx_unqualified_id Product: gcc Version: 14.2.0 Status: UNCONFIRMED Severity: no

[Bug libstdc++/109941] [feat req] Add an option to mark STL types as nodiscard

2024-12-15 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109941 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com ---

[Bug c++/115361] "possibly dangling reference to a temporary" when object is_empty

2024-10-02 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115361 --- Comment #6 from Arthur O'Dwyer --- Thanks, that looks much less noisy! (Assuming godbolt.org has updated already.) I now see this: // https://godbolt.org/z/WqT6hs8ed f3, f7, and f9 now all give -Wuninitialized at -O1 and higher (and false-

[Bug c++/116233] New: Explicit specialization of an enum member

2024-08-04 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116233 Bug ID: 116233 Summary: Explicit specialization of an enum member Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++

[Bug c++/116160] Rejects repeated using-declaration `using A::x;` [namespace.udecl]

2024-07-31 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116160 --- Comment #2 from Arthur O'Dwyer --- > I am not sure this [the first case] is valid code though. The Standard contains an example of exactly this situation: https://eel.is/c++draft/namespace.udecl#example-8 using A::x; // OK, hides struct

[Bug c++/116160] New: Rejects repeated using-declaration `using A::x;` [namespace.udecl]

2024-07-31 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116160 Bug ID: 116160 Summary: Rejects repeated using-declaration `using A::x;` [namespace.udecl] Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal

[Bug libstdc++/101485] Calling std::equal with std::byte* does not use memcmp

2024-07-04 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101485 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com ---

[Bug c++/115718] New: Deficiencies in -Wnrvo

2024-06-30 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115718 Bug ID: 115718 Summary: Deficiencies in -Wnrvo Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee

[Bug libstdc++/115444] std::copy_n generates more code than needed

2024-06-27 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115444 --- Comment #5 from Arthur O'Dwyer --- > Yes, so that std::copy_n benefits from the same memmove optimization as > std::copy. Right, I'm not objecting to the memmove optimization, just to the current codebase's approach of "slightly pessimize

[Bug libstdc++/109150] std::fill should use __gnu_cxx::__is_scalar overloads for all scalars

2024-06-19 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109150 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com ---

[Bug libstdc++/115497] [15 Regression] __is_pointer doesn't compile with clang since 014879ea4c86b3b8ab6b61a1226ee5b31e816c8b

2024-06-15 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115497 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com ---

[Bug libstdc++/115444] New: std::copy_n generates more code than needed

2024-06-11 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115444 Bug ID: 115444 Summary: std::copy_n generates more code than needed Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: l

[Bug driver/115440] New: unrecognized command-line option '--c++17'; did you mean '--stdc++17'?

2024-06-11 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115440 Bug ID: 115440 Summary: unrecognized command-line option '--c++17'; did you mean '--stdc++17'? Product: gcc Version: unknown Status: UNCONFIRMED Severity: norm

[Bug c++/115361] New: "possibly dangling reference to a temporary" when object is_empty

2024-06-05 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115361 Bug ID: 115361 Summary: "possibly dangling reference to a temporary" when object is_empty Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal

[Bug c/115097] New: Strange suboptimal codegen specifically at -O2 when copying struct type

2024-05-14 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115097 Bug ID: 115097 Summary: Strange suboptimal codegen specifically at -O2 when copying struct type Product: gcc Version: unknown Status: UNCONFIRMED Severity: nor

[Bug c++/114898] New: Converting {} to a tag type should be ill-formed SFINAE-friendly

2024-04-30 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114898 Bug ID: 114898 Summary: Converting {} to a tag type should be ill-formed SFINAE-friendly Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal

[Bug libstdc++/114817] Wrong codegen for std::copy of "trivially copyable but not trivially assignable" type

2024-04-26 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114817 --- Comment #3 from Arthur O'Dwyer --- https://github.com/boostorg/container/issues/153 , from 2020, is another similar issue. There, boost::container::vector had assumed that if __has_trivial_copy(T) and is_copy_constructible_v, then T could be

[Bug libstdc++/114817] Wrong codegen for std::copy of "trivially copyable but not trivially assignable" type

2024-04-23 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114817 --- Comment #1 from Arthur O'Dwyer --- Yes, vector reallocation has analogous trouble with types that are "trivial, but not trivially copy constructible." https://godbolt.org/z/Psboqf3MP (libc++ happens to sidestep this pitfall *on Clang 15+,*

[Bug libstdc++/114817] New: Wrong codegen for std::copy of "trivially copyable but not trivially assignable" type

2024-04-22 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114817 Bug ID: 114817 Summary: Wrong codegen for std::copy of "trivially copyable but not trivially assignable" type Product: gcc Version: unknown Status: UNCONFIRMED

[Bug c++/114479] [14 Regression] std::is_array_v changed from false to true in GCC 14

2024-04-01 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114479 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com ---

[Bug tree-optimization/109945] Escape analysis hates copy elision: different result with -O1 vs -O2

2024-02-20 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109945 --- Comment #31 from Arthur O'Dwyer --- Oops, I guess my reading did disagree with jwakely's in one small point: jwakely writes-- > But since one of the pointers is an invalid pointer, > you can't do anything with its value anyway, including > c

[Bug tree-optimization/109945] Escape analysis hates copy elision: different result with -O1 vs -O2

2024-02-20 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109945 --- Comment #30 from Arthur O'Dwyer --- I think I understand jwakely's argument at this point, and it's consistent and teachable. https://eel.is/c++draft/class.temporary#3.sentence-1 says: > When an object of class type X is passed to or return

[Bug c++/113789] [13 Regression] ICE on P2266/C++23 `decltype(throw x)` where x is move-eligible parameter

2024-02-16 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113789 --- Comment #10 from Arthur O'Dwyer --- FWIW, I think I agree with your analysis. To reiterate what you already said (and I think GCC already gets the following snippet correct): in X g (X x) try { throw x; } catch (...) {

[Bug c++/113853] implicit move in throw in trailing return type

2024-02-10 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113853 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com ---

[Bug c++/113789] [13/14 Regression] ICE on P2266/C++23 `decltype(throw x)` where x is move-eligible parameter

2024-02-06 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113789 --- Comment #6 from Arthur O'Dwyer --- (In reply to Marek Polacek from comment #5) > IOW, this should be accepted in C++23 but isn't (clang++ accepts in C++23): > [...] Correct, at least that's my intended interpretation. But the unexpected IC

[Bug c++/113789] New: ICE on P2266/C++23 `decltype(throw x)` where x is move-eligible parameter

2024-02-06 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113789 Bug ID: 113789 Summary: ICE on P2266/C++23 `decltype(throw x)` where x is move-eligible parameter Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: norm

[Bug c++/113563] New: Rejects capture of `this` in C++23 `this auto` lambda

2024-01-23 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113563 Bug ID: 113563 Summary: Rejects capture of `this` in C++23 `this auto` lambda Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Compo

[Bug c++/113541] New: Rejects __attribute__((section)) on explicit instantiation declaration of ctor/dtor

2024-01-22 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113541 Bug ID: 113541 Summary: Rejects __attribute__((section)) on explicit instantiation declaration of ctor/dtor Product: gcc Version: unknown Status: UNCONFIRMED S

[Bug c++/113427] New: ICE: tree check: C++23 `this auto` lambda + multiple (ambiguous) inheritance from closure type

2024-01-16 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113427 Bug ID: 113427 Summary: ICE: tree check: C++23 `this auto` lambda + multiple (ambiguous) inheritance from closure type Product: gcc Version: unknown Status: UNCONFIRMED

[Bug c++/112555] New: NTTP of cv-qualified pointer type fails to mangle in those qualifiers

2023-11-15 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112555 Bug ID: 112555 Summary: NTTP of cv-qualified pointer type fails to mangle in those qualifiers Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal

[Bug c++/102470] C++20 NTTP causes ICE

2023-11-15 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102470 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com ---

[Bug c++/99524] initializer_list storage considered a temporary when accessed through NTTP

2023-11-15 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99524 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com --- C

[Bug c++/112471] New: catch handler of type "reference to array" should be unreachable, but is reached

2023-11-09 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112471 Bug ID: 112471 Summary: catch handler of type "reference to array" should be unreachable, but is reached Product: gcc Version: 14.0 Status: UNCONFIRMED Severit

[Bug c++/112436] New: SFINAE-unfriendly error on throwing pointer to incomplete type

2023-11-07 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112436 Bug ID: 112436 Summary: SFINAE-unfriendly error on throwing pointer to incomplete type Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal

[Bug c++/94039] conditional operator fails to use proper overload

2023-10-07 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94039 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com --- C

[Bug libstdc++/111351] constexpr std::string objects permitted to escape constant evaluation when SSO

2023-09-12 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111351 --- Comment #6 from Arthur O'Dwyer --- (In reply to James Y Knight from comment #5) > > Does using __builtin_is_constant_p on the union member not work? > > I've created a proof-of-concept patch for libc++ to support SSO strings > during consta

[Bug libstdc++/111351] constexpr std::string objects permitted to escape constant evaluation when SSO

2023-09-08 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111351 --- Comment #1 from Arthur O'Dwyer --- (Author of the blog post here.) In contrast to James' view, I think the libstdc++/MSVC behavior is relatively easy to explain; I think libc++'s `if consteval` approach is baroque and confusing. [That is, _b

[Bug c++/86646] Special member function 'cannot be defaulted' if type alias is used

2023-08-18 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86646 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com --- C

[Bug libstdc++/106611] std::is_nothrow_copy_constructible returns wrong result

2023-08-08 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106611 --- Comment #13 from Arthur O'Dwyer --- (In reply to Andrew Pinski from comment #12) > I suspect this is a dup of bug 100470 then. Yep, I agree. My previous comment was a longwinded version of jwakely's https://gcc.gnu.org/bugzilla/show_bug.cgi

[Bug libstdc++/106611] std::is_nothrow_copy_constructible returns wrong result

2023-08-08 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106611 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com ---

[Bug c++/94162] ICE [neg] bad return type in defaulted <=>

2023-08-08 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94162 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com --- C

[Bug c++/101943] ICE: Segmentation fault (in cat_tag_for)

2023-08-08 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101943 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com ---

[Bug c++/110948] New: Incorrect -Winvalid-constexpr on virtual defaulted operator==

2023-08-08 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110948 Bug ID: 110948 Summary: Incorrect -Winvalid-constexpr on virtual defaulted operator== Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: diagnostic

[Bug libstdc++/110917] std::format_to(int*, ...) fails to compile because of _S_make_span

2023-08-07 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110917 --- Comment #2 from Arthur O'Dwyer --- > Alternatively, we could replace the contiguous_iterator<_OutIter> constraint > with constructible_from, _OutIter, iter_difference_t<_OutIter>>. I think `is_same` is preferable to `constructible_from<...

[Bug libstdc++/110917] New: std::format_to(int*, ...) fails to compile because of _S_make_span

2023-08-05 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110917 Bug ID: 110917 Summary: std::format_to(int*, ...) fails to compile because of _S_make_span Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: rejects-val

[Bug libstdc++/70472] is_copy_constructible>>::value is true

2023-07-24 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70472 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com --- C

[Bug c++/110102] [13 regression] initializer_list ctors of containers skip Allocator_traits::construct, copies move-only type

2023-06-10 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110102 --- Comment #9 from Arthur O'Dwyer --- (In reply to Jason Merrill from comment #8) > (In reply to Arthur O'Dwyer from comment #6) > > I still think it would be nice if GCC stopped supporting > > int f(std::vector v) { return v[0]; } > > , at

[Bug c++/110102] [13/14 regression] initializer_list ctors of containers skip Allocator_traits::construct, copies move-only type

2023-06-05 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110102 --- Comment #6 from Arthur O'Dwyer --- (In reply to Jason Merrill from comment #5) > (In reply to Arthur O'Dwyer from comment #4) > > My first, reduced, example, where `std::list v = {1,2,3}` is accepted for > > move-only type `A`, is 100% a bug

[Bug c++/110102] [13/14 regression] initializer_list ctors of containers skip Allocator_traits::construct, copies move-only type

2023-06-04 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110102 --- Comment #4 from Arthur O'Dwyer --- I came across the `Widget` bug in the course of writing (and it's now mentioned in) this blog post on value semantics and PMR: https://quuxplusone.github.io/blog/2023/06/03/p1144-pmr-koans/#the-evil-allocat

[Bug libstdc++/110102] New: [13 regression] initializer_list ctors of containers skip Allocator_traits::construct, copies move-only type

2023-06-02 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110102 Bug ID: 110102 Summary: [13 regression] initializer_list ctors of containers skip Allocator_traits::construct, copies move-only type Product: gcc Version: 13.1.0

[Bug c++/110005] New: Writable strings seem too greedy in overload resolution

2023-05-27 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110005 Bug ID: 110005 Summary: Writable strings seem too greedy in overload resolution Product: gcc Version: unknown Status: UNCONFIRMED Keywords: diagnostic

[Bug tree-optimization/109945] Escape analysis hates copy elision: different result with -O1 vs -O2

2023-05-23 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109945 --- Comment #11 from Arthur O'Dwyer --- (In reply to Andrew Pinski from comment #8) > (In reply to Arthur O'Dwyer from comment #7) > > // https://godbolt.org/z/Ea43Y65z4 > > struct Widget { > > int i = 1; > ... > > In this case, Widget has n

[Bug tree-optimization/109945] Escape analysis hates copy elision: different result with -O1 vs -O2

2023-05-23 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109945 --- Comment #7 from Arthur O'Dwyer --- Richard Biener wrote: > Are we using the wrong check or is escaping 'this' > for these kind of classes invoking undefined behavior? Wow, this got a lot of traffic quickly! Sounds like you (Richard, Andrew

[Bug c++/109945] New: Escape analysis hates copy elision: different result with -O1 vs -O2

2023-05-23 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109945 Bug ID: 109945 Summary: Escape analysis hates copy elision: different result with -O1 vs -O2 Product: gcc Version: unknown Status: UNCONFIRMED Keywords: wrong-

[Bug c++/93106] [c++2a] Deleted move constructor is not selected when returning an automatic variable

2023-04-27 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93106 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com --- C

[Bug c++/108759] "mandatory copy elision" not implemented during constant evaluation redux

2023-04-27 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108759 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com ---

[Bug libstdc++/108846] std::copy, std::copy_n and std::copy_backward on potentially overlapping subobjects

2023-04-20 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108846 --- Comment #23 from Arthur O'Dwyer --- (In reply to Jonathan Wakely from comment #22) > > Richi suggested that we could avoid these runtime branches (which hurt > optimization, see PR 109445) if we knew how many bytes of tail padding there > a

[Bug c++/109381] New: Ambiguous member lookup with this-> accepted when it should be rejected

2023-04-02 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109381 Bug ID: 109381 Summary: Ambiguous member lookup with this-> accepted when it should be rejected Product: gcc Version: unknown Status: UNCONFIRMED Keywords: acc

[Bug c++/100248] ICE with global "default" keyword

2023-03-29 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100248 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com ---

[Bug c++/109017] New: ICE on unexpanded pack from C++20 explicit-template-parameter lambda syntax

2023-03-03 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109017 Bug ID: 109017 Summary: ICE on unexpanded pack from C++20 explicit-template-parameter lambda syntax Product: gcc Version: unknown Status: UNCONFIRMED Keywords:

[Bug libstdc++/108846] std::copy, std::copy_n and std::copy_backward on potentially overlapping subobjects

2023-02-23 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108846 --- Comment #11 from Arthur O'Dwyer --- (In reply to Jonathan Wakely from comment #10) > std::move(x,y,z) and std::copy(z,y,z) use the same underlying > implementation, so it does have the same issue, but will be fixed by the > same change. Rig

[Bug libstdc++/108846] New: std::copy, std::copy_n on potentially overlapping subobjects

2023-02-18 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108846 Bug ID: 108846 Summary: std::copy, std::copy_n on potentially overlapping subobjects Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal

[Bug c++/108257] New: Incorrect (non-unique) mangling of structured binding's backing variable

2022-12-31 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108257 Bug ID: 108257 Summary: Incorrect (non-unique) mangling of structured binding's backing variable Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: norma

[Bug c++/108216] Wrong offset for (already-constructed) virtual base during construction of full object

2022-12-23 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108216 --- Comment #1 from Arthur O'Dwyer --- Possibly tangentially related: #70644, #81051

[Bug c++/108216] New: Wrong offset for (already-constructed) virtual base during construction of full object

2022-12-23 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108216 Bug ID: 108216 Summary: Wrong offset for (already-constructed) virtual base during construction of full object Product: gcc Version: 13.0 Status: UNCONFIRMED S

[Bug c++/87697] Casting a base class to derived gives no warning

2022-12-23 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87697 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com --- C

[Bug c++/106903] New: Incorrectly accepts call to function template when deduced type doesn't match adjusted type

2022-09-11 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106903 Bug ID: 106903 Summary: Incorrectly accepts call to function template when deduced type doesn't match adjusted type Product: gcc Version: 13.0 Status: UNCONFIRMED

[Bug libstdc++/105241] New: std::bitset::reference should have an ADL swap

2022-04-12 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105241 Bug ID: 105241 Summary: std::bitset::reference should have an ADL swap Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: l

[Bug c++/104792] [g++ and/or libstdc++] Wunused-local-typedefs + C++20 concepts = annoying

2022-03-05 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104792 --- Comment #2 from Arthur O'Dwyer --- @Andrew Pinski: Sorry, looks like my description ended up not matching the Godbolt (I said "three lines marked X," but there are only two lines marked X, for example.) Here's the Godbolt with one of the tw

[Bug c++/104792] New: [g++ and/or libstdc++] Wunused-local-typedefs + C++20 concepts = annoying

2022-03-04 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104792 Bug ID: 104792 Summary: [g++ and/or libstdc++] Wunused-local-typedefs + C++20 concepts = annoying Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: norm

[Bug libstdc++/68350] std::uninitialized_copy overly restrictive for trivially_copyable types

2022-02-24 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68350 --- Comment #12 from Arthur O'Dwyer --- jwakely wrote: > Correction: they need to be the same type. We can't memcpy here: > > struct A { }; > struct B { B() = default; B(A) { do_stuff(); } }; > > void (A* f, A* l, B* out) { > std::uninitialized

[Bug libstdc++/104559] New: vector v; v.insert(v.begin()); compiles, but it shouldn't

2022-02-15 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104559 Bug ID: 104559 Summary: vector v; v.insert(v.begin()); compiles, but it shouldn't Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Pri

[Bug middle-end/104195] New: Fails to optimize nested array indexing p[i/N].data[i%N]

2022-01-23 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104195 Bug ID: 104195 Summary: Fails to optimize nested array indexing p[i/N].data[i%N] Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Prio

[Bug c++/101421] ICE: in lookup_template_class_1, at cp/pt.c:10005

2022-01-04 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101421 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com ---

[Bug c++/101239] "Internal compiler error: Error reporting routines re-entered." in size_in_bytes_loc

2021-12-13 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101239 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com ---

[Bug c++/96441] ICE in tree check: expected integer_cst, have cond_expr in get_len, at tree.h:5954

2021-10-27 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96441 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com --- C

[Bug c++/102419] [11/12 Regression][concepts] [regression] return-type-requirement of "Y" does not check that T::type actually exists

2021-09-21 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102419 --- Comment #4 from Arthur O'Dwyer --- > IMHO Clang/MSVC are clearly misbehaving here -- when evaluating the > concept-id X, they appear to be substituting {int} into X's > constraint-expression instead of into the normal form of X's > constr

[Bug c++/102419] New: [concepts] [regression] return-type-requirement of "Y" does not check that T::type actually exists

2021-09-20 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102419 Bug ID: 102419 Summary: [concepts] [regression] return-type-requirement of "Y" does not check that T::type actually exists Product: gcc Version: 12.0

[Bug c++/94673] [concepts] What is the return type of local parameters of requires expressions?

2021-09-20 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94673 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com --- C

[Bug c++/81157] If constexpr does not support Short-circuit evaluation

2021-09-20 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81157 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com --- C

[Bug c++/92505] Using mutable in constexpr

2021-09-06 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92505 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com --- C

[Bug libstdc++/81078] dynamic_cast to virtual base produces the wrong answer

2021-08-18 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81078 --- Comment #3 from Arthur O'Dwyer --- Yes, this is a libstdc++ issue. I'm not 100% sure that "the RTTI [generated by GCC] is correct," because I don't know how to use GCC with libc++; but yeah, there's definitely at least some problem with libs

[Bug c++/101353] New: [x86-64] missed optimization: missed tail call in placement-new

2021-07-06 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101353 Bug ID: 101353 Summary: [x86-64] missed optimization: missed tail call in placement-new Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal

[Bug libstdc++/96416] to_address() is broken by static_assert in pointer_traits

2021-03-26 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96416 --- Comment #13 from Arthur O'Dwyer --- > And are you recommending that everyone who defines their custom contiguous > iterators specializes pointer_traits for them? Call it _quite_ annoying... Definitely not! When you define a contiguous iterat

[Bug c++/76262] list-initialization prefers initializer_list over copy constructor

2021-03-17 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=76262 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com --- C

[Bug c++/70816] bogus error __builtin_strcmp is not a constant expression in a constexpr function

2021-03-14 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70816 Arthur O'Dwyer changed: What|Removed |Added CC||arthur.j.odwyer at gmail dot com --- C

[Bug libstdc++/99417] New: [C++17] std::variant assignment fails to compile

2021-03-05 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99417 Bug ID: 99417 Summary: [C++17] std::variant assignment fails to compile Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component

  1   2   >