public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/5659: default access for class/struct bug
@ 2002-03-12 12:42 nathan
  0 siblings, 0 replies; 4+ messages in thread
From: nathan @ 2002-03-12 12:42 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, matzmich, nathan, nobody, pcarlini

Synopsis: default access for class/struct bug

Responsible-Changed-From-To: unassigned->nathan
Responsible-Changed-By: nathan
Responsible-Changed-When: Tue Mar 12 12:42:26 2002
Responsible-Changed-Why:
    patch in progress

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5659


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

* Re: c++/5659: default access for class/struct bug
@ 2002-03-12 15:38 nathan
  0 siblings, 0 replies; 4+ messages in thread
From: nathan @ 2002-03-12 15:38 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, matzmich, nathan, pcarlini

Synopsis: default access for class/struct bug

State-Changed-From-To: analyzed->closed
State-Changed-By: nathan
State-Changed-When: Tue Mar 12 15:38:27 2002
State-Changed-Why:
    2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
    
    	PR c++/5659
    	* decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
    	* decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
    	definitions.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5659


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

* Re: c++/5659: default access for class/struct bug
@ 2002-03-03 14:56 nathan
  0 siblings, 0 replies; 4+ messages in thread
From: nathan @ 2002-03-03 14:56 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, matzmich, nobody, pcarlini

Synopsis: default access for class/struct bug

State-Changed-From-To: open->analyzed
State-Changed-By: nathan
State-Changed-When: Sun Mar  3 14:56:18 2002
State-Changed-Why:
    confirmed as a regression from 3.0

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5659


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

* c++/5659: default access for class/struct bug
@ 2002-02-11 12:46 pcarlini
  0 siblings, 0 replies; 4+ messages in thread
From: pcarlini @ 2002-02-11 12:46 UTC (permalink / raw)
  To: gcc-gnats; +Cc: matzmich


>Number:         5659
>Category:       c++
>Synopsis:       default access for class/struct bug
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 11 12:46:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Michael Matz / Paolo Carlini
>Release:        g++ (GCC) 3.1 20020209 (experimental)
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
look at this:
---- snip -----
class Outer {
    private:
#if 1
        class Inner;
#else
        struct Inner;
#endif
        Inner *i;
    public:
        void pub();
};

struct Outer::Inner {
    Inner(int i) : mem(i) {}
    int mem;
};

void Outer::pub() { i = new Inner(42); }
---- snap -----

Notice how Outer::Inner is once declared with 'class', once with 'struct',
but defined with 'struct' in evry case.  The current HEAD thinks:

access.cpp:14: `Outer::Inner::Inner(int)' is private
access.cpp:20: within this context

(when it's changed to #if 0 it of course works).  Now the standard says
(if we read it correctly) (11.2), that the default access right of members
depends on the _definition_ not declaration of a class.
>How-To-Repeat:
-gcc3.0.x compiles the testcase just fine, as EDG-based
compilers do.
-In such cases some compilers warn about "inconsistent use
of class/struct keywords". 
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2002-03-12 23:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-12 12:42 c++/5659: default access for class/struct bug nathan
  -- strict thread matches above, loose matches on Subject: below --
2002-03-12 15:38 nathan
2002-03-03 14:56 nathan
2002-02-11 12:46 pcarlini

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