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

2024-02-02 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111948 Bug 111948 depends on bug 112439, which changed state. Bug 112439 Summary: [13/14 Regression] Modification of a member overlapping with a [[no_unique_address]] member in the constructor is incorrectly rejected in constant evaluation since r13-1

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

2023-12-06 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|ASSIGNED|RESOLVED Resolution|---

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

2023-12-06 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111948 --- Comment #10 from GCC Commits --- The releases/gcc-13 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:be26992b3115b95189ac02fcf25902cb5430c0e1 commit r13-8133-gbe26992b3115b95189ac02fcf25902cb5430c0e1 Author: Jonathan Wak

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

2023-12-05 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111948 --- Comment #9 from GCC Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:08448dc146b6dd32383d64ab491a594d41f62aaa commit r14-6200-g08448dc146b6dd32383d64ab491a594d41f62aaa Author: Jonathan Wakely Date:

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

2023-11-23 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 Depends on||112439 Assignee|unassigned

[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 libstdc++/111948] subrange modifies a const size object

2023-11-08 Thread de34 at live dot cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111948 Jiang An changed: What|Removed |Added CC||de34 at live dot cn --- Comment #6 from Jian

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

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

[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++/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++/111948] subrange modifies a const size object

2023-10-23 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111948 --- Comment #1 from 康桓瑋 --- This is the cause: constexpr subrange(__detail::__convertible_to_non_slicing<_It> auto __i, _Sent __s, __size_type __n) noexcept(is_nothrow_constructible_v<_It, decltype(__i)>