[Bug c++/99637] bit_cast doesn't work with padding bits and it should

2023-04-26 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99637 m.cencora at gmail dot com changed: What|Removed |Added CC||m.cencora at gmail dot com -

[Bug c++/99637] bit_cast doesn't work with padding bits and it should

2021-03-18 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99637 --- Comment #7 from Jonathan Wakely --- Yes. If the result type is a class type and the padding bits in the input correspond to unsigned char or std::byte subobjects in the result, that's OK (because the only parts with indeterminate values are b

[Bug c++/99637] bit_cast doesn't work with padding bits and it should

2021-03-18 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99637 --- Comment #6 from Jakub Jelinek --- (In reply to Jonathan Wakely from comment #5) > (In reply to Jonathan Wakely from comment #4) > > So the result cannot be created. > > Not during constant evaluation, anyway. And outside of constant evaluat

[Bug c++/99637] bit_cast doesn't work with padding bits and it should

2021-03-18 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99637 --- Comment #5 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #4) > So the result cannot be created. Not during constant evaluation, anyway.

[Bug c++/99637] bit_cast doesn't work with padding bits and it should

2021-03-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99637 --- Comment #4 from Jonathan Wakely --- I think the relevant sentence is "Each bit of the value representation of the result is equal to the corresponding bit in the object representation of from." For one of the bits in the result, there is no

[Bug c++/99637] bit_cast doesn't work with padding bits and it should

2021-03-17 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99637 Jakub Jelinek changed: What|Removed |Added CC||jason at gcc dot gnu.org,

[Bug c++/99637] bit_cast doesn't work with padding bits and it should

2021-03-17 Thread hanicka at hanicka dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99637 --- Comment #2 from Hana Dusíková --- I know this is not an argument but MSVC accepts this code, meanwhile I'm asking Richard what to do about it.

[Bug c++/99637] bit_cast doesn't work with padding bits and it should

2021-03-17 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99637 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #1