public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/25637]  New: [3.4/4.0/4.1/4.2 regression] Member definition in wrong scope accepted
@ 2006-01-02 13:45 reichelt at gcc dot gnu dot org
  2006-01-02 16:52 ` [Bug c++/25637] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-01-02 13:45 UTC (permalink / raw)
  To: gcc-bugs

The following two invalid code snippets are accepted by the C++ frontend
(the members of A cannot be defined in B):

===============================================
struct A { void foo(); };

struct B { friend void A::foo() {} };
===============================================

===============================================
struct A { A(); };

struct B { friend A::A() {} };
===============================================

Since the second code snippet was rejected in GCC 3.2.x and 3.3.x
(although with a bogus error message) this is regression.


-- 
           Summary: [3.4/4.0/4.1/4.2 regression] Member definition in wrong
                    scope accepted
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25637



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

end of thread, other threads:[~2006-03-01  5:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-02 13:45 [Bug c++/25637] New: [3.4/4.0/4.1/4.2 regression] Member definition in wrong scope accepted reichelt at gcc dot gnu dot org
2006-01-02 16:52 ` [Bug c++/25637] " pinskia at gcc dot gnu dot org
2006-01-03  2:06 ` mmitchel at gcc dot gnu dot org
2006-01-03  8:38 ` mmitchel at gcc dot gnu dot org
2006-01-03  8:40 ` mmitchel at gcc dot gnu dot org
2006-01-03  8:41 ` mmitchel at gcc dot gnu dot org
2006-01-03  8:47 ` [Bug c++/25637] [3.4 " mmitchel at gcc dot gnu dot org
2006-01-04 11:07 ` reichelt at gcc dot gnu dot org
2006-03-01  5:09 ` gdr at gcc dot gnu dot 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).