public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/29138] New: access declarations don't work for classes
@ 2006-09-19 10:32 andrew dot stubbs at st dot com
2006-09-20 7:12 ` [Bug c++/29138] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: andrew dot stubbs at st dot com @ 2006-09-19 10:32 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1001 bytes --]
class A
{
public:
int i;
class A1
{
int j;
};
};
class B : private A
{
public:
A::i;
A::A1;
};
void
f ()
{
B b;
b.i = 1;
B::A1 a1;
}
The above program does not compile with the following messages:
t.cpp:15: error: declaration does not declare anything
t.cpp: In function void f():
t.cpp:6: error: class A::A1 is inaccessible
t.cpp:23: error: within this context
The C++ standard section 11.3 talks about access declarators. It does not
explicitly say that inner classes can be used this way, but nor does it say
they cannot. Note that the integer `i' works fine with the same idiom.
--
Summary: access declarations don't work for classes
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: andrew dot stubbs at st dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29138
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/29138] [4.0/4.1/4.2 Regression] access declarations don't work for classes
2006-09-19 10:32 [Bug c++/29138] New: access declarations don't work for classes andrew dot stubbs at st dot com
2006-09-20 7:12 ` [Bug c++/29138] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
@ 2006-09-20 7:12 ` pinskia at gcc dot gnu dot org
2006-09-21 2:34 ` mmitchel at gcc dot gnu dot org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-20 7:12 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Known to fail| |3.0.4 4.0.0 4.1.0 3.2.3
| |3.4.0 3.3.3 4.2.0
Known to work| |2.95.3
Summary|access declarations don't |[4.0/4.1/4.2 Regression]
|work for classes |access declarations don't
| |work for classes
Target Milestone|--- |4.0.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29138
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/29138] [4.0/4.1/4.2 Regression] access declarations don't work for classes
2006-09-19 10:32 [Bug c++/29138] New: access declarations don't work for classes andrew dot stubbs at st dot com
@ 2006-09-20 7:12 ` pinskia at gcc dot gnu dot org
2006-09-20 7:12 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-20 7:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-09-20 07:12 -------
Confirmed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-09-20 07:12:40
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29138
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/29138] [4.0/4.1/4.2 Regression] access declarations don't work for classes
2006-09-19 10:32 [Bug c++/29138] New: access declarations don't work for classes andrew dot stubbs at st dot com
2006-09-20 7:12 ` [Bug c++/29138] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-09-20 7:12 ` pinskia at gcc dot gnu dot org
@ 2006-09-21 2:34 ` mmitchel at gcc dot gnu dot org
2006-10-03 0:05 ` mmitchel at gcc dot gnu dot org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-09-21 2:34 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29138
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/29138] [4.0/4.1/4.2 Regression] access declarations don't work for classes
2006-09-19 10:32 [Bug c++/29138] New: access declarations don't work for classes andrew dot stubbs at st dot com
` (2 preceding siblings ...)
2006-09-21 2:34 ` mmitchel at gcc dot gnu dot org
@ 2006-10-03 0:05 ` mmitchel at gcc dot gnu dot org
2006-10-03 18:04 ` mmitchel at gcc dot gnu dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-10-03 0:05 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |mark at codesourcery dot com
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29138
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/29138] [4.0/4.1/4.2 Regression] access declarations don't work for classes
2006-09-19 10:32 [Bug c++/29138] New: access declarations don't work for classes andrew dot stubbs at st dot com
` (3 preceding siblings ...)
2006-10-03 0:05 ` mmitchel at gcc dot gnu dot org
@ 2006-10-03 18:04 ` mmitchel at gcc dot gnu dot org
2006-10-03 18:06 ` mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-10-03 18:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from mmitchel at gcc dot gnu dot org 2006-10-03 18:04 -------
Subject: Bug 29138
Author: mmitchel
Date: Tue Oct 3 18:04:10 2006
New Revision: 117409
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117409
Log:
PR c++/29138
* decl2.c (grokfield): Don't handle access declarations here.
* parser.c (cp_parser_using_declaration): Handle access
declarations too.
(cp_parser_block_declaration): Adjust calls to
cp_parser_using_declaration.
(cp_parser_member_declaration): Likewise. Use
cp_parser_using_declaration to look for access_declarations.
PR c++/29138
* g++.dg/inherit/access8.C: New test.
* g++.dg/template/dtor4.C: Tweak error messages.
Added:
trunk/gcc/testsuite/g++.dg/inherit/access8.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl2.c
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/template/dtor4.C
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29138
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/29138] [4.0/4.1/4.2 Regression] access declarations don't work for classes
2006-09-19 10:32 [Bug c++/29138] New: access declarations don't work for classes andrew dot stubbs at st dot com
` (4 preceding siblings ...)
2006-10-03 18:04 ` mmitchel at gcc dot gnu dot org
@ 2006-10-03 18:06 ` mmitchel at gcc dot gnu dot org
2006-10-03 18:11 ` [Bug c++/29138] [4.0 " mmitchel at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-10-03 18:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from mmitchel at gcc dot gnu dot org 2006-10-03 18:06 -------
Subject: Bug 29138
Author: mmitchel
Date: Tue Oct 3 18:06:00 2006
New Revision: 117410
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117410
Log:
PR c++/29138
* decl2.c (grokfield): Don't handle access declarations here.
* parser.c (cp_parser_using_declaration): Handle access
declarations too.
(cp_parser_block_declaration): Adjust calls to
cp_parser_using_declaration.
(cp_parser_member_declaration): Likewise. Use
cp_parser_using_declaration to look for access_declarations.
PR c++/29138
* g++.dg/inherit/access8.C: New test.
* g++.dg/template/dtor4.C: Tweak error messages.
Added:
branches/gcc-4_1-branch/gcc/testsuite/g++.dg/inherit/access8.C
Modified:
branches/gcc-4_1-branch/gcc/cp/ChangeLog
branches/gcc-4_1-branch/gcc/cp/decl2.c
branches/gcc-4_1-branch/gcc/cp/parser.c
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
branches/gcc-4_1-branch/gcc/testsuite/g++.dg/template/dtor4.C
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29138
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/29138] [4.0 Regression] access declarations don't work for classes
2006-09-19 10:32 [Bug c++/29138] New: access declarations don't work for classes andrew dot stubbs at st dot com
` (5 preceding siblings ...)
2006-10-03 18:06 ` mmitchel at gcc dot gnu dot org
@ 2006-10-03 18:11 ` mmitchel at gcc dot gnu dot org
2006-10-03 18:39 ` mmitchel at gcc dot gnu dot org
2007-02-03 20:17 ` gdr at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-10-03 18:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from mmitchel at gcc dot gnu dot org 2006-10-03 18:09 -------
Fixed in 4.1.2, 4.2.0.
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|mark at codesourcery dot com|unassigned at gcc dot gnu
| |dot org
Status|ASSIGNED |NEW
Summary|[4.0/4.1/4.2 Regression] |[4.0 Regression] access
|access declarations don't |declarations don't work for
|work for classes |classes
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29138
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/29138] [4.0 Regression] access declarations don't work for classes
2006-09-19 10:32 [Bug c++/29138] New: access declarations don't work for classes andrew dot stubbs at st dot com
` (6 preceding siblings ...)
2006-10-03 18:11 ` [Bug c++/29138] [4.0 " mmitchel at gcc dot gnu dot org
@ 2006-10-03 18:39 ` mmitchel at gcc dot gnu dot org
2007-02-03 20:17 ` gdr at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-10-03 18:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from mmitchel at gcc dot gnu dot org 2006-10-03 18:39 -------
Subject: Bug 29138
Author: mmitchel
Date: Tue Oct 3 18:39:32 2006
New Revision: 117411
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117411
Log:
PR c++/29138
* decl2.c (grokfield): Don't handle access declarations here.
* parser.c (cp_parser_using_declaration): Handle access
declarations too.
(cp_parser_block_declaration): Adjust calls to
cp_parser_using_declaration.
(cp_parser_member_declaration): Likewise. Use
cp_parser_using_declaration to look for access_declarations.
PR c++/29138
* g++.dg/inherit/access8.C: New test.
* g++.dg/template/dtor4.C: Tweak error messages.
Modified:
trunk/gcc/cp/parser.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29138
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/29138] [4.0 Regression] access declarations don't work for classes
2006-09-19 10:32 [Bug c++/29138] New: access declarations don't work for classes andrew dot stubbs at st dot com
` (7 preceding siblings ...)
2006-10-03 18:39 ` mmitchel at gcc dot gnu dot org
@ 2007-02-03 20:17 ` gdr at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: gdr at gcc dot gnu dot org @ 2007-02-03 20:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from gdr at gcc dot gnu dot org 2007-02-03 20:17 -------
Fixed in GCC-4.1.2.
--
gdr at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|4.0.4 |4.1.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29138
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2007-02-03 20:17 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-19 10:32 [Bug c++/29138] New: access declarations don't work for classes andrew dot stubbs at st dot com
2006-09-20 7:12 ` [Bug c++/29138] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-09-20 7:12 ` pinskia at gcc dot gnu dot org
2006-09-21 2:34 ` mmitchel at gcc dot gnu dot org
2006-10-03 0:05 ` mmitchel at gcc dot gnu dot org
2006-10-03 18:04 ` mmitchel at gcc dot gnu dot org
2006-10-03 18:06 ` mmitchel at gcc dot gnu dot org
2006-10-03 18:11 ` [Bug c++/29138] [4.0 " mmitchel at gcc dot gnu dot org
2006-10-03 18:39 ` mmitchel at gcc dot gnu dot org
2007-02-03 20:17 ` 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).