public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101872] New: static_cast succeeds in CRTP with incorrect type
@ 2021-08-12  8:11 vpervouchine at gmail dot com
  2021-08-12 15:17 ` [Bug c++/101872] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: vpervouchine at gmail dot com @ 2021-08-12  8:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101872

            Bug ID: 101872
           Summary: static_cast succeeds in CRTP with incorrect type
           Product: gcc
           Version: 11.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vpervouchine at gmail dot com
  Target Milestone: ---

Created attachment 51296
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51296&action=edit
Preprocessor output. See the actual code from line 11011 onwards

static_cast of *this to an incorrect "Derived" class inside a CRTP base
succeeds when Derived itself is a variadic template, leading to invalid
addressing of member variables of the derived class.
Since the preprocessed file doesn't include comments, please see them in the
source file here: https://godbolt.org/z/oKv1xeK9G

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-12 15:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-12  8:11 [Bug c++/101872] New: static_cast succeeds in CRTP with incorrect type vpervouchine at gmail dot com
2021-08-12 15:17 ` [Bug c++/101872] " pinskia at gcc dot gnu.org

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).