[Bug libstdc++/112480] optional::reset emits inefficient code when T is trivially-destructible

2023-11-13 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112480 --- Comment #8 from Jonathan Wakely --- Good point, it looks like we get the same codegen improvement for ~T(){} even at -O1 if we don't restrict it to trivially destructible types. There seems to be no difference in codegen for

[Bug libstdc++/112480] optional::reset emits inefficient code when T is trivially-destructible

2023-11-13 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112480 --- Comment #6 from Jonathan Wakely --- I think I prefer: --- a/libstdc++-v3/include/std/optional +++ b/libstdc++-v3/include/std/optional @@ -311,6 +311,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { if (this->_M_engaged)

[Bug c++/112498] std::is_convertible::value returns false

2023-11-13 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112498 --- Comment #3 from Jonathan Wakely --- Maybe we could add "is not allowed in ISO C++" or similar to the warning.

[Bug libstdc++/111638] GLIBCXX_MAYBE_UNDERSCORED_FUNCS autoconf macro doesn't work

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

[Bug libstdc++/79700] std::fabsf and std::fabsl missing from

2023-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700 Jonathan Wakely changed: What|Removed |Added Target Milestone|13.3|14.0 Status|NEW

[Bug libstdc++/112473] integer_sequence accepts non-integer types

2023-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112473 Jonathan Wakely changed: What|Removed |Added Target Milestone|13.3|12.4

[Bug libstdc++/112473] integer_sequence accepts non-integer types

2023-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org Target Milestone|--- |13.3

[Bug libstdc++/112467] [14 Regression] libstdc++ fails to build on clang: bits/stl_bvector.h:189:23: error: '__assume__' attribute cannot be applied to a statement

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

[Bug middle-end/110859] New FAIL: 23_containers/vector/bool/110807.cc

2023-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110859 --- Comment #5 from Jonathan Wakely --- Should be fixed at r14-5260-ge39b3e02c27bd7

[Bug libstdc++/112480] optional::reset emits inefficient code when T is trivially-destructible

2023-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112480 --- Comment #4 from Jonathan Wakely --- (In reply to Andrew Pinski from comment #3) > I think that is because that transformation would violate the memory model > of C++. Ah yes. It would be safe for another thread to read the same memory

[Bug libstdc++/112467] [14 Regression] libstdc++ fails to build on clang: bits/stl_bvector.h:189:23: error: '__assume__' attribute cannot be applied to a statement

2023-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112467 Jonathan Wakely changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org

[Bug libstdc++/112480] optional::reset emits inefficient code when T is trivially-destructible

2023-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112480 Jonathan Wakely changed: What|Removed |Added Last reconfirmed||2023-11-10

[Bug libstdc++/112473] integer_sequence accepts non-integer types

2023-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112473 --- Comment #3 from Jonathan Wakely --- Although you couldn't use std::pair as a NTTP until C++20 anyway.

[Bug libstdc++/112473] integer_sequence accepts non-integer types

2023-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112473 --- Comment #2 from Jonathan Wakely --- Ah it changed in C++20, previously it said "T shall be an integral type" so was just UB.

[Bug libstdc++/112467] [14 Regression] libstdc++ fails to build on clang: bits/stl_bvector.h:189:23: error: '__assume__' attribute cannot be applied to a statement

2023-11-09 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112467 --- Comment #5 from Jonathan Wakely --- Oh, but that's presumably true for clang, just not in this context. Ugh.

[Bug libstdc++/112467] [14 Regression] libstdc++ fails to build on clang: bits/stl_bvector.h:189:23: error: '__assume__' attribute cannot be applied to a statement

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

[Bug libstdc++/112348] [C++23] defect in struct hash>

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

[Bug libstdc++/111667] [C++23] Implement P1132R8, out_ptr - a scalable output pointer abstraction

2023-11-09 Thread redi at gcc dot gnu.org via Gcc-bugs
|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org --- Comment #2 from Jonathan Wakely --- Mine.

[Bug c++/112456] New: Diagnostic for [[nodiscard]] on a constructor could be improved

2023-11-09 Thread redi at gcc dot gnu.org via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- struct S { [[nodiscard]] S() { } }; void f() { S(); } This correctly warns: nod.cc: In function 'void

[Bug sanitizer/109882] sanitizer/common_interface_defs.h bogusly defines __has_feature

2023-11-09 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109882 --- Comment #10 from Jonathan Wakely --- The fix has been committed upstream now.

[Bug libstdc++/111172] Dead code in std::get for variant?

2023-11-09 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72 Jonathan Wakely changed: What|Removed |Added Target Milestone|14.0|13.3

[Bug libstdc++/112452] : operator|(_Range&& __r, _Self&& __self) should return decltype(auto)

2023-11-09 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112452 Jonathan Wakely changed: What|Removed |Added CC||ppalka at gcc dot gnu.org ---

[Bug libstdc++/8670] Alignment problem in std::basic_string

2023-11-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=8670 --- Comment #24 from Jonathan Wakely --- Oh, but this would be an ABI break. When using the explicit instantiation definitions in libstdc++.so allocations and deallocations will match because both will come from the library. But if anything is

[Bug libstdc++/8670] Alignment problem in std::basic_string

2023-11-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=8670 Jonathan Wakely changed: What|Removed |Added Assignee|giovannibajo at gmail dot com |redi at gcc dot gnu.org

[Bug libstdc++/8670] Alignment problem in std::basic_string

2023-11-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=8670 --- Comment #22 from Jonathan Wakely --- This bug is still present in the COW std::string, which is still supported even though it's not the default. There are two problems. The first is the one reported by James Kanze, that the string contents

[Bug c/112442] Segfault from casting a ptr when using -O2

2023-11-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112442 --- Comment #8 from Jonathan Wakely --- The aliasing doesn't happen when writing to the array, it's when reading a char* value from an object of type unsigned char*. If you just passed the unsigned char* to memcpy instead of *(char**) it would

[Bug c/112442] Segfault from casting a ptr when using -O2

2023-11-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112442 --- Comment #2 from Jonathan Wakely --- Looks like it doesn't always segfault, but the contents of the tmp buffer are incorrect (which might segfault, or might fail to print "test!").

[Bug tree-optimization/93971] std::string considered to alias declared objects of incompatible types

2023-11-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93971 --- Comment #12 from Jonathan Wakely --- (In reply to Jason Merrill from comment #11) > I don't think it's valid to use a plain char array as storage for an object > of another type; the "provides storage" wording in >

[Bug libstdc++/112440] Compiler does not grok basic_string::resize and basic_string::reserve if _CharT is char

2023-11-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112440 Jonathan Wakely changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2023-11-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19495 --- Comment #28 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #27) > But the alignment problem still seems to be present in the COW std::string. But I think that's covered by PR 8670, which is still open.

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2023-11-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19495 --- Comment #27 from Jonathan Wakely --- (In reply to Ben Elliston from comment #26) > This test now passes on powerpc*-linux-gnu. I wonder how ... the "fix" got reverted, and we still use an allocator of char to create the storage for the COW

[Bug libstdc++/112440] Compiler does not grok basic_string::resize and basic_string::reserve if _CharT is char

2023-11-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112440 Jonathan Wakely changed: What|Removed |Added Last reconfirmed||2023-11-08

[Bug c++/112439] Modification of a member overlapping with a [[no_unique_address]] member in the constructor is incorrectly rejected in constant evaluation

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

[Bug libstdc++/111948] subrange modifies a const size object

2023-11-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111948 --- Comment #7 from Jonathan Wakely --- Thanks! I briefly tried but failed to reproduce it in a reduced example.

[Bug c++/112437] ICE with throw inside concept sometimes and -std=c++20

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

[Bug libstdc++/105580] [12/13/14 Regression] warning "potential null pointer dereference" raised when using istreambuf_iterator and any "-O" flag

2023-11-07 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105580 Jonathan Wakely changed: What|Removed |Added CC||jlame646 at gmail dot com ---

[Bug middle-end/86172] [meta-bug] issues with -Wnull-dereference

2023-11-07 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86172 Bug 86172 depends on bug 112421, which changed state. Bug 112421 Summary: GCC emits warning potential null dereference https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112421 What|Removed |Added

[Bug c++/112421] GCC emits warning potential null dereference

2023-11-07 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112421 Jonathan Wakely changed: What|Removed |Added Resolution|--- |DUPLICATE

[Bug libbacktrace/112263] [C++23] std::stacktrace does not identify symbols in shared library

2023-11-06 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112263 --- Comment #17 from Jonathan Wakely --- Thanks, Ian!

[Bug c/112409] Structure is not initialized as expected

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

[Bug c/112409] Structure is not initialized as expected

2023-11-06 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112409 Jonathan Wakely changed: What|Removed |Added Resolution|--- |INVALID

[Bug c/112409] Structure is not initialized as expected

2023-11-06 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112409 --- Comment #3 from Jonathan Wakely --- (In reply to Frediano Ziglio from comment #0) > static unsigned > cksum(const void *pkt, size_t len, unsigned int start) > { > const uint16_t *data = (const uint16_t *) pkt; > unsigned sum =

[Bug middle-end/110859] New FAIL: 23_containers/vector/bool/110807.cc

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

[Bug libstdc++/110807] [13 Regression] Copy list initialisation of a vector raises a warning with -O2

2023-11-06 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110807 --- Comment #12 from Jonathan Wakely --- I don't think _M_offset can ever be out of range, it's always set by the library code. Doesn't the warning come from this line, which doesn't use _M_offset anyway? _Bit_type* __q =

[Bug libstdc++/112351] libstdc++ locale init doesn't handle __gthread_once failure

2023-11-06 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112351 --- Comment #2 from Jonathan Wakely --- Ah yes, that's a good point. Patrick's improvement affects this initialization. It's not done for all targets though, as not all targets have linker support for the init_priority attribute (notably,

[Bug c++/112377] Implement -Walloc-size in c++

2023-11-06 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112377 --- Comment #3 from Jonathan Wakely --- (In reply to David Binderman from comment #0) > I think that should be enough to implement the new warning for C++. Certainly not. Apart from the fact that there's a lot more needed than just making the

[Bug libstdc++/112397] Two persistent libstdc++ test failures on x86_64-apple-darwin

2023-11-06 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112397 Jonathan Wakely changed: What|Removed |Added CC||iains at gcc dot gnu.org --- Comment

[Bug c++/112269] [14 Regression] x86_64 GNU/Linux '-m32' multilib 'libstdc++-v3/include/complex:1493: internal compiler error: in tsubst_expr, at cp/pt.cc:21534' since r14-4796-g3e3d73ed5e85e7

2023-11-04 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112269 --- Comment #9 from Jonathan Wakely --- (In reply to Patrick Palka from comment #5) > I can't reproduce any of these testsuite failures on trunk with x86_64 > -m32... could you provide a preprocessed source file perhaps? The libstdc++

[Bug c/112373] cppcheck: libcpp/charset.cc: 3 * obvious performance issue

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

[Bug libbacktrace/112263] [C++23] std::stacktrace does not identify symbols in shared library

2023-11-03 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112263 Jonathan Wakely changed: What|Removed |Added CC||rimvydas.jas at gmail dot com ---

[Bug libbacktrace/111315] libstdc++ stacktrace testsuite failures with --enable-default-pie

2023-11-03 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111315 Jonathan Wakely changed: What|Removed |Added Resolution|--- |DUPLICATE Status|NEW

[Bug c++/112335] missed optimization on reset and assign unique_ptr

2023-11-03 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112335 --- Comment #10 from Jonathan Wakely --- Ah, now I understand what you've been saying about the postcondition. Yes, but the compiler doesn't know the postcondition, it's just words in the standard, so not visible to the optimization passes.

[Bug c++/112335] missed optimization on reset and assign unique_ptr

2023-11-03 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112335 --- Comment #8 from Jonathan Wakely --- (In reply to Federico Kircheis from comment #7) > > Demo: https://godbolt.org/z/PWd96j4fz > > Thank you for the example, but honestly, I think I am still missing > something. > > If you modify the main

[Bug libstdc++/112314] Missing index assertions in basic_string_view

2023-11-02 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112314 --- Comment #4 from Jonathan Wakely --- (In reply to Jose Dapena Paz from comment #2) > In any case, the failing test is actually passing -1, my understanding is > that that one should always assert no matter what we are passing as const >

[Bug c++/112335] missed optimization on reset and assign unique_ptr

2023-11-02 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112335 Jonathan Wakely changed: What|Removed |Added Resolution|--- |INVALID

[Bug libstdc++/112314] Missing index assertions in basic_string_view

2023-11-02 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112314 --- Comment #7 from Jonathan Wakely --- (In reply to Jose Dapena Paz from comment #5) > - The length is less than the possible pointer difference (checked with > numeric_limits). That seems too lenient to me, because for wchar_t, char16_t and

[Bug libstdc++/112349] ranges::max makes unnecessary copies

2023-11-02 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112349 Jonathan Wakely changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed|

[Bug libstdc++/112314] Missing index assertions in basic_string_view

2023-11-02 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112314 --- Comment #6 from Jonathan Wakely --- Created attachment 56494 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56494=edit Check [ptr,end) and [ptr,ptr+n) ranges with _GLIBCXX_ASSERTIONS With this change we could add:

[Bug libstdc++/112351] libstdc++ locale init doesn't handle __gthread_once failure

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

[Bug c++/107513] [Feature Request] Implement __attribute__((__nodebug__))

2023-11-01 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107513 --- Comment #7 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #6) > The patch for PR 96780 added -ffold-simple-inlines which works for some > specific functions. This attribute would extend that to arbitrary functions. I

[Bug c++/112318] Deprecated move ctor does not trigger -Wdeprecated-declarations when creating a std::optional

2023-10-31 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112318 --- Comment #3 from Jonathan Wakely --- As this bug points out, we probably want to warn for any uses of deprecated entities declared in user code, whether used in system headers or in user code. And for something like std::auto_ptr which is

[Bug c++/112318] Deprecated move ctor does not trigger -Wdeprecated-declarations when creating a std::optional

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

[Bug c++/112315] 32-bit numeric conversion functions missing - only wstring versions defined

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

[Bug libstdc++/112314] Missing index assertions in basic_string_view

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

[Bug c++/112315] 32-bit numeric conversion functions missing - only wstring versions defined

2023-10-31 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112315 Jonathan Wakely changed: What|Removed |Added See Also||https://bugzilla.redhat.com

[Bug c++/107513] [Feature Request] Implement __attribute__((__nodebug__))

2023-10-30 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107513 Jonathan Wakely changed: What|Removed |Added Last reconfirmed||2023-10-31

[Bug c++/112301] [Regression 12/13/14] Double destruction of returned object when exiting the scope causes an exception which gets rethrown

2023-10-30 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112301 Jonathan Wakely changed: What|Removed |Added Keywords||wrong-code Summary|Double

[Bug c++/112296] __builtin_constant_p doesn't propagate through member functions

2023-10-30 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112296 --- Comment #3 from Jonathan Wakely --- (In reply to Barry Revzin from comment #0) > inline int direct(Span span) { > return __builtin_constant_p(span.size()); > } > > inline int indirect(Span span) { > size_t s = span.size(); >

[Bug c++/112296] __builtin_constant_p doesn't propagate through member functions

2023-10-30 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112296 --- Comment #2 from Jonathan Wakely --- I think you mean std::is_constant_evaluated, but that doesn't check values, it checks if the function is being evaluated as constexpr. And if-constexpr can't be used here either, that works like

[Bug c++/112293] Enhance error reporting with fix-it for missing in gcc 14

2023-10-30 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112293 --- Comment #6 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #1) > That would be difficult, because std::remove is overloaded and another > overload was found here (the one declared in ). Usually we only > provide fix-it

[Bug c++/112293] Enhance error reporting with fix-it for missing in gcc 14

2023-10-30 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112293 --- Comment #4 from Jonathan Wakely --- FWIW the change in transitive includes was r14-1459-g940645cec500ab

[Bug c++/112293] Enhance error reporting with fix-it for missing in gcc 14

2023-10-30 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112293 --- Comment #3 from Jonathan Wakely --- As I wrote in PR 82594, the error should say that the number of arguments is wrong instead of the irrelevant error about converting to const char*. I don't think a fix-it is likely here though.

[Bug c++/82594] Please provide better parameter / argument mismatch warnings/notes for no overloads case

2023-10-30 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82594 Jonathan Wakely changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug c++/112293] Enhance error reporting with fix-it for missing in gcc 14

2023-10-30 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112293 --- Comment #2 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #1) > This is broken in two ways, you need to include both *and* > for this program. Actually three ways. There is no guarantee that std::vector's iterators

[Bug c++/112293] Enhance error reporting with fix-it for missing in gcc 14

2023-10-30 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112293 --- Comment #1 from Jonathan Wakely --- (In reply to Petr Vaněk from comment #0) > The issue appears to arise from internal changes in libstdc++ that now > require the explicit inclusion of the header (this part is > likely a bug within

[Bug spam/8943] spam

2023-10-28 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=8943 Jonathan Wakely changed: What|Removed |Added Priority|P3 |P5 CC|gcc-bugs at gcc

[Bug libstdc++/112263] [C++23] std::stacktrace does not identify symbols in shared library

2023-10-28 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112263 --- Comment #1 from Jonathan Wakely --- I'm not sure if this is a libstdc++ problem or should be component=libbacktrace

[Bug libstdc++/112097] _PSTL_EARLYEXIT_PRESENT macro doesn't correctly identify intel compilers.

2023-10-28 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112097 --- Comment #3 from Jonathan Wakely --- I hope the Intel devs got it right :)

[Bug libstdc++/82366] std::regex constructor called from shared library throws std::bad_cast

2023-10-27 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82366 --- Comment #12 from Jonathan Wakely --- Is the engine a C++ application, or C, or something else?

[Bug libstdc++/82366] std::regex constructor called from shared library throws std::bad_cast

2023-10-27 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82366 --- Comment #10 from Jonathan Wakely --- My best guess for what's happening in the original report is that the shared library is being loaded into a running process which uses an older version of libstdc++, and so the locale facets needed by the

[Bug libstdc++/82366] std::regex constructor called from shared library throws std::bad_cast

2023-10-27 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82366 --- Comment #9 from Jonathan Wakely --- If this only happens when the shared library is loaded from a closed source application, you really need to talk to Oracle.

[Bug libstdc++/82366] std::regex constructor called from shared library throws std::bad_cast

2023-10-27 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82366 --- Comment #8 from Jonathan Wakely --- We still don't have a complete description of the problem though.

[Bug libstdc++/112089] std::shared_lock::unlock should throw operation_not_permitted instead resource_deadlock_would_occur

2023-10-26 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112089 Jonathan Wakely changed: What|Removed |Added Target Milestone|--- |11.5 --- Comment #3 from Jonathan

[Bug libstdc++/112100] ubsan: misses UB when modifying std::string's trailing \0

2023-10-26 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112100 --- Comment #4 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #2) > It would need a completely new category of "memory location that you can > read and write to but nothing else" That was supposed to say "read and write

[Bug libstdc++/112100] ubsan: misses UB when modifying std::string's trailing \0

2023-10-26 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112100 --- Comment #3 from Jonathan Wakely --- (In reply to Andrew Pinski from comment #1) > Maybe some how libstdc++ debug mode can catch this > https://gcc.gnu.org/onlinedocs/gcc-13.2.0/libstdc++/manual/manual/ >

[Bug libstdc++/112100] ubsan: misses UB when modifying std::string's trailing \0

2023-10-26 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112100 --- Comment #2 from Jonathan Wakely --- (In reply to Jan Engelhardt from comment #0) > ==55843==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xsomething How would that even be possible? The terminating nul clearly has to be in

[Bug libstdc++/112097] _PSTL_EARLYEXIT_PRESENT macro doesn't correctly identify intel compilers.

2023-10-26 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112097 Jonathan Wakely changed: What|Removed |Added Last reconfirmed||2023-10-26

[Bug libstdc++/112089] std::shared_lock::unlock should throw operation_not_permitted instead resource_deadlock_would_occur

2023-10-25 Thread redi at gcc dot gnu.org via Gcc-bugs
|1 Status|UNCONFIRMED |ASSIGNED Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org --- Comment #1 from Jonathan Wakely --- Good catch, thanks! I think I probably just copy the throw from one of the locking functions

[Bug libstdc++/111936] std::stacktrace cannot be used in a shared library

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

[Bug c++/111974] internal error: Segmentation fault on Ubuntu 23.10 (x86-64) - compiling RefPerSys

2023-10-25 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111974 --- Comment #2 from Jonathan Wakely --- (In reply to Basile Starynkevitch from comment #0) > Please submit a full bug report, with preprocessed source (by using > -freport-bug). ^^^

[Bug objc++/111920] [14 Regression] encode-{8,9,10}.mm internal compiler error: in tsubst_expr, at cp/pt.cc:21533

2023-10-25 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111920 --- Comment #4 from Jonathan Wakely --- N.B. this same ICE was affecting C++ too, several libstdc++ tests failed with -std=c++20, e.g. GLIBCXX_TESTSUITE_STDS=20 make check RUNTESTFLAGS=conformance.exp=*/48101-2_neg.cc

[Bug c++/111897] Initialization of _Float16 with f.p. constant gives false warning

2023-10-25 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111897 Jonathan Wakely changed: What|Removed |Added Resolution|--- |INVALID

[Bug libstdc++/111963] Predicate copied when it could be forwarded in some STL algorithms

2023-10-24 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111963 --- Comment #1 from Jonathan Wakely --- The internal functions like __partition could just take forwarding references to the predicates, at least for C++11 and later.

[Bug libstdc++/65675] make bootstrap fails when configured with --disable-hosted-libstdcxx

2023-10-24 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65675 --- Comment #8 from Jonathan Wakely --- libitm needs getenv, and so does libsanitizer: /home/test/src/gcc/libsanitizer/ubsan/ubsan_flags.cpp: In function ‘const char* __ubsan::GetFlag(const char*)’:

[Bug libstdc++/65675] make bootstrap fails when configured with --disable-hosted-libstdcxx

2023-10-24 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65675 Jonathan Wakely changed: What|Removed |Added Last reconfirmed||2023-10-24 Ever confirmed|0

[Bug libstdc++/111948] subrange modifies a const size object

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

[Bug libstdc++/111936] std::stacktrace cannot be used in a shared library

2023-10-24 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111936 Jonathan Wakely changed: What|Removed |Added Target Milestone|13.3|12.4 --- Comment #10 from Jonathan

[Bug libstdc++/111948] subrange modifies a const size object

2023-10-24 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111948 --- Comment #3 from Jonathan Wakely --- This compiles OK: namespace std::ranges { template class subrange { private: template struct _Size { }; template struct _Size { U _M_size; };

[Bug libstdc++/111948] subrange modifies a const size object

2023-10-24 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111948 --- Comment #2 from Jonathan Wakely --- (In reply to 康桓瑋 from comment #1) > _M_size._M_size in the function body is already const. It shouldn't be. Is that a compiler bug? Clang compiles the same libstdc++ code without problems.

[Bug libstdc++/111936] std::stacktrace cannot be used in a shared library

2023-10-24 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111936 --- Comment #8 from Jonathan Wakely --- Run autoreconf in the libstdc++-v3 dir, but you need the right versions of automake and autoconf. The effect of doing that would be this additional patch, which I didn't show (because it's just a

<    5   6   7   8   9   10   11   12   13   14   >