[Bug c++/94951] [8/9 Regression] dereferencing type-punned pointer will break strict-aliasing rules when using super class for a template type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94951 Andrew Pinski changed: What|Removed |Added CC||a-yee at u dot northwestern.edu --- Comment #12 from Andrew Pinski --- *** Bug 91343 has been marked as a duplicate of this bug. ***
[Bug c++/94951] [8/9 Regression] dereferencing type-punned pointer will break strict-aliasing rules when using super class for a template type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94951 Andrew Pinski changed: What|Removed |Added CC||rrrlasse at hotmail dot com --- Comment #11 from Andrew Pinski --- *** Bug 81152 has been marked as a duplicate of this bug. ***
[Bug c++/94951] [8/9 Regression] dereferencing type-punned pointer will break strict-aliasing rules when using super class for a template type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94951 Jakub Jelinek changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #10 from Jakub Jelinek --- Fixed for 8.5 in r8-10503-g79a11b9833baa91cef7c881532e01470fa25047f and by the above commit for 9.4+ too.
[Bug c++/94951] [8/9 Regression] dereferencing type-punned pointer will break strict-aliasing rules when using super class for a template type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94951 --- Comment #9 from CVS Commits --- The releases/gcc-9 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:eca1dbea010ba4c18ccec90bacbad5d8ec72c09f commit r9-8897-geca1dbea010ba4c18ccec90bacbad5d8ec72c09f Author: Jakub Jelinek Date: Wed May 6 23:38:13 2020 +0200 c++: Avoid strict_aliasing_warning on dependent types or expressions [PR94951] The following testcase gets a bogus warning during build_base_path, when cp_build_indirect_ref* calls strict_aliasing_warning with a dependent expression. IMHO calling get_alias_set etc. on dependent types feels wrong to me, we should just defer the warnings in those cases until instantiation and only handle the cases where neither type nor expr are dependent. 2020-05-06 Jakub Jelinek PR c++/94951 * typeck.c (cp_strict_aliasing_warning): New function. (cp_build_indirect_ref_1, build_reinterpret_cast_1): Use it instead of strict_aliasing_warning. * g++.dg/warn/Wstrict-aliasing-bogus-tmpl.C: New test. (cherry picked from commit d82414ebcf7716ea24688510594a2c464a105908)
[Bug c++/94951] [8/9 Regression] dereferencing type-punned pointer will break strict-aliasing rules when using super class for a template type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94951 Jakub Jelinek changed: What|Removed |Added Summary|[8/9/10/11 Regression] |[8/9 Regression] |dereferencing type-punned |dereferencing type-punned |pointer will break |pointer will break |strict-aliasing rules when |strict-aliasing rules when |using super class for a |using super class for a |template type |template type --- Comment #8 from Jakub Jelinek --- Fixed for 10.2+ and 11+ so far.