Follow-up Comment #2, bug #66416 (group screen): [comment #0 propos initial :] > gcc 15 seems to be more strict about casting, [...]
Casts are fine. GCC 15 is just stricter about implicit conversions (casts are explicit conversions). > casts from pointers without a cast are more strict in c23 should have been "conversions from pointers without a cast [...]". [comment #1 commentaire #1 :] > [ note: drat, missed the title. this turns out to not actually be a c23 > issue as i thought, but a gcc15 issue ] Indeed. This comes from https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=9715c545d33b3a32ddc1ae817ba9356ade1fb9df https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96284 (partly) It seems that the code is allowed by any version of the ISO C standard (e.g., in C23 6.3.2.3p7: "A pointer to an object type may be converted to a pointer to a different object type." with just an obvious restriction about the alignment). A diagnostic isn't even required. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?66416> _______________________________________________ Message posté via Savannah https://savannah.gnu.org/
signature.asc
Description: PGP signature