public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94951] [8/9/10/11 Regression] dereferencing type-punned pointer will break strict-aliasing rules when using super class for a template type Date: Wed, 06 May 2020 21:38:48 +0000 [thread overview] Message-ID: <bug-94951-4-8difLBWF9V@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-94951-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94951 --- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:46fcef99f49cc2d9f28d98f8ecdbf8263e9e0a87 commit r11-153-g46fcef99f49cc2d9f28d98f8ecdbf8263e9e0a87 Author: Jakub Jelinek <jakub@redhat.com> 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 <jakub@redhat.com> 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.
next prev parent reply other threads:[~2020-05-06 21:38 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-05 10:01 [Bug c++/94951] New: " jorgen.lind at gmail dot com 2020-05-05 11:47 ` [Bug c++/94951] " rguenth at gcc dot gnu.org 2020-05-05 13:52 ` [Bug c++/94951] [8/9/10/11 Regression] " jakub at gcc dot gnu.org 2020-05-05 13:54 ` jakub at gcc dot gnu.org 2020-05-05 13:56 ` jakub at gcc dot gnu.org 2020-05-05 13:56 ` jakub at gcc dot gnu.org 2020-05-05 16:28 ` jakub at gcc dot gnu.org 2020-05-06 21:38 ` cvs-commit at gcc dot gnu.org [this message] 2020-05-07 13:28 ` cvs-commit at gcc dot gnu.org 2020-05-07 13:36 ` [Bug c++/94951] [8/9 " jakub at gcc dot gnu.org 2020-09-16 19:22 ` cvs-commit at gcc dot gnu.org 2020-09-17 17:50 ` jakub at gcc dot gnu.org 2021-07-23 21:19 ` pinskia at gcc dot gnu.org 2021-10-25 5:08 ` pinskia at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-94951-4-8difLBWF9V@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).