public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/106756] New: Overbroad friendship for nested classes
@ 2022-08-26 15:16 herring at lanl dot gov
  2022-08-26 15:19 ` [Bug c++/106756] " redi at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: herring at lanl dot gov @ 2022-08-26 15:16 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 106756
           Summary: Overbroad friendship for nested classes
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: herring at lanl dot gov
  Target Milestone: ---

Sometime since 12.2, GCC has started accepting

struct A {
  struct B {
    friend int f(B*) {return i;}
  };
private:
  static int i;
};

despite the express limitation in [class.nest]/4 (/3 in the latest draft). 
(Current Clang also accepts it, but ICC and MSVC do not.)

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

end of thread, other threads:[~2024-05-21  9:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-26 15:16 [Bug c++/106756] New: Overbroad friendship for nested classes herring at lanl dot gov
2022-08-26 15:19 ` [Bug c++/106756] " redi at gcc dot gnu.org
2022-08-26 15:34 ` herring at lanl dot gov
2022-08-29  8:25 ` [Bug c++/106756] [13 Regression] " rguenth at gcc dot gnu.org
2022-09-12 19:27 ` [Bug c++/106756] [CWG1699] " jason at gcc dot gnu.org
2023-04-26  6:56 ` rguenth at gcc dot gnu.org
2023-05-30 12:33 ` ppalka at gcc dot gnu.org
2023-07-27  9:23 ` rguenth at gcc dot gnu.org
2024-05-21  9:12 ` jakub 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).