public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/113286] New: GCC accepts invalid program involving cast to protected base class
@ 2024-01-09 3:30 jlame646 at gmail dot com
2024-01-09 4:09 ` [Bug c++/113286] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: jlame646 at gmail dot com @ 2024-01-09 3:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113286
Bug ID: 113286
Summary: GCC accepts invalid program involving cast to
protected base class
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: jlame646 at gmail dot com
Target Milestone: ---
The following invalid program is accepted only by gcc.
https://godbolt.org/z/73Mh9bres
```
struct A {};
struct B: public A {int stuff() {return 5;} };
struct C: protected B { using B::A; };
void call(A &) {}
int main()
{
C c;
call(c);
}
```
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/113286] GCC accepts invalid program involving cast to protected base class
2024-01-09 3:30 [Bug c++/113286] New: GCC accepts invalid program involving cast to protected base class jlame646 at gmail dot com
@ 2024-01-09 4:09 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-09 4:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113286
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 62240.
*** This bug has been marked as a duplicate of bug 62240 ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-09 4:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-09 3:30 [Bug c++/113286] New: GCC accepts invalid program involving cast to protected base class jlame646 at gmail dot com
2024-01-09 4:09 ` [Bug c++/113286] " 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).