[Bug c++/108342] std::complex: ignoring packed attribute because of unpacked non-POD field

2023-01-09 Thread ruilvo at ua dot pt via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108342 --- Comment #12 from Rui Oliveira --- (In reply to Jakub Jelinek from comment #11) > No, if you have the packed ph_fcomplex_t not aligned at alignof (float), you > need > to copy it to a properly aligned variable before trying to reinterpret_ca

[Bug c++/108342] std::complex: ignoring packed attribute because of unpacked non-POD field

2023-01-09 Thread ruilvo at ua dot pt via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108342 --- Comment #10 from Rui Oliveira --- So my options are to create like a placeholder, say ```c typedef struct __attribute__((__packed__)) // Packed isn't really necessary here I think? { float re, im; } ph_fcomplex_t ``` To silence the w

[Bug libstdc++/108342] std::complex: ignoring packed attribute because of unpacked non-POD field

2023-01-09 Thread ruilvo at ua dot pt via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108342 --- Comment #4 from Rui Oliveira --- (In reply to Andrew Pinski from comment #2) > Hmm: diff.cpp03.numerics I saw you moved the bug to libstdc++ but is the problem libstdc++, or should g++ just accept packing when it encounters it?

[Bug libstdc++/108342] std::complex: ignoring packed attribute because of unpacked non-POD field

2023-01-09 Thread ruilvo at ua dot pt via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108342 --- Comment #3 from Rui Oliveira --- (In reply to Andrew Pinski from comment #1) > > I know about _Atomic and std::atomic but not std::complex and _Complex. > Because std::complex was part of C++98 which was done before C99's _Complex > ... [c

[Bug c++/108342] New: std::complex: ignoring packed attribute because of unpacked non-POD field

2023-01-09 Thread ruilvo at ua dot pt via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108342 Bug ID: 108342 Summary: std::complex: ignoring packed attribute because of unpacked non-POD field Product: gcc Version: 12.2.1 Status: UNCONFIRMED Severity: no