[Bug c++/114537] bit_cast does not work NSDMI of bitfields

2024-06-11 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114537 --- Comment #8 from Jakub Jelinek --- Should be fixed for 12.4+ and 13.4+ too.

[Bug c++/114537] bit_cast does not work NSDMI of bitfields

2024-06-11 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114537 --- Comment #7 from GCC Commits --- The releases/gcc-12 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:42afabb838d511f5feb150bfa4e68b5880aae1fa commit r12-10518-g42afabb838d511f5feb150bfa4e68b5880aae1fa Author: Jakub Jelinek

[Bug c++/114537] bit_cast does not work NSDMI of bitfields

2024-04-20 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114537 --- Comment #6 from GCC Commits --- The releases/gcc-13 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:a297f9bbb9611414fe48f6d61a8829bf5808bd2c commit r13-8626-ga297f9bbb9611414fe48f6d61a8829bf5808bd2c Author: Jakub Jelinek

[Bug c++/114537] bit_cast does not work NSDMI of bitfields

2024-04-05 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114537 --- Comment #5 from Fedor Chelnokov --- Sorry, in above example I had to use `unsigned char` type: ``` #include struct A { unsigned char a : 7; }; static_assert( std::bit_cast(std::bit_cast(A{1})).a == 1 ); ``` This program even after the

[Bug c++/114537] bit_cast does not work NSDMI of bitfields

2024-04-04 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114537 --- Comment #4 from GCC Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:1baec8deb014b8a7da58879a407a4c00cdeb5a09 commit r14-9784-g1baec8deb014b8a7da58879a407a4c00cdeb5a09 Author: Jakub Jelinek Date:

[Bug c++/114537] bit_cast does not work NSDMI of bitfields

2024-04-03 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114537 Jakub Jelinek changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed|

[Bug c++/114537] bit_cast does not work NSDMI of bitfields

2024-04-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114537 --- Comment #2 from Andrew Pinski --- (In reply to Fedor Chelnokov from comment #1) > Probably related: > ``` > #include > > struct A { int a: 7; }; > > static_assert( 1 == std::bit_cast(std::bit_cast(A{1})).a ); > ``` > It looks valid and

[Bug c++/114537] bit_cast does not work NSDMI of bitfields

2024-04-01 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114537 --- Comment #1 from Fedor Chelnokov --- Probably related: ``` #include struct A { int a: 7; }; static_assert( 1 == std::bit_cast(std::bit_cast(A{1})).a ); ``` It looks valid and accepted by MSVC, but GCC prints: error: '__builtin_bit_cast'