public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/29048] New: "`x' is private" error duplicated when scope specified
@ 2006-09-12 22:27 herring at lanl dot gov
2006-09-12 22:32 ` [Bug c++/29048] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: herring at lanl dot gov @ 2006-09-12 22:27 UTC (permalink / raw)
To: gcc-bugs
Given file `ptest.cpp':
class A {int i;};
class B : public A {B() {A::i=0;}};
I get (with quotes replaced with ASCII and some bijective directory
simplification)
$ g++ -v ptest.cpp
Reading specs from
/opt/local/gcc402/bin/../lib/gcc/i686-pc-linux-gnu/4.0.2/specs
Target: i686-pc-linux-gnu
Configured with: /opt/build/gcc-4.0.2/configure --with-included-gettext
--enable-libgcj --enable-__cxa_atexit --with-gmp=/usr/packages/libgmp41
--with-mpfr=/usr/packages/libmpfr22
--with-gmp-ldflags=-Wl,-rpath,/usr/packages/libgmp41/lib
--with-mpfr-ldflags=-Wl,-rpath,/usr/packages/libmpfr22/lib
--enable-languages=ada,c,c++,f95,java --datadir=/usr/packages/gcc402/share
--with-gnu-as --with-as=/usr/packages/gcc402/i686-pc-linux-gnu/bin/as
--with-gnu-ld --with-ld=/usr/packages/gcc402/i686-pc-linux-gnu/bin/ld
--with-local-prefix=/usr/packages/gcc402
--with-gxx-include-dir=/usr/packages/gcc402/include/c++
--prefix=/usr/packages/gcc402
Thread model: posix
gcc version 4.0.2 (TWW)
/opt/local/gcc402/bin/../libexec/gcc/i686-pc-linux-gnu/4.0.2/cc1plus -quiet -v
-iprefix /opt/local/gcc402/bin/../lib/gcc/i686-pc-linux-gnu/4.0.2/
-D_GNU_SOURCE ptest.cpp -quiet -dumpbase ptest.cpp -mtune=pentiumpro -auxbase
ptest -version -o /tmp/cccHYSJN.s
ignoring nonexistent directory
"/opt/local/gcc402/bin/../lib/gcc/i686-pc-linux-gnu/4.0.2/../../../../i686-pc-linux-gnu/include"
ignoring duplicate directory
"/usr/packages/gcc402/lib/gcc/i686-pc-linux-gnu/4.0.2/include"
ignoring nonexistent directory
"/usr/packages/gcc402/lib/gcc/i686-pc-linux-gnu/4.0.2/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/opt/local/gcc402/bin/../lib/gcc/i686-pc-linux-gnu/4.0.2/include
/usr/packages/gcc402/include/c++
/usr/packages/gcc402/include/c++/i686-pc-linux-gnu
/usr/packages/gcc402/include/c++/backward
/usr/packages/gcc402/include
/usr/include
End of search list.
GNU C++ version 4.0.2 (TWW) (i686-pc-linux-gnu)
compiled by GNU C version 4.0.2 (TWW).
GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=128115
ptest.cpp: In constructor `B::B()':
ptest.cpp:1: error: `int A::i' is private
ptest.cpp:2: error: within this context
ptest.cpp:1: error: `int A::i' is private
ptest.cpp:2: error: within this context
The error is quite accurate, but it's given twice! The error is only printed
once if "A::" is omitted from the file.
--
Summary: "`x' is private" error duplicated when scope specified
Product: gcc
Version: 4.0.2
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: herring at lanl dot gov
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29048
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/29048] [4.0/4.1/4.2 Regression] "`x' is private" error duplicated when scope specified
2006-09-12 22:27 [Bug c++/29048] New: "`x' is private" error duplicated when scope specified herring at lanl dot gov
@ 2006-09-12 22:32 ` pinskia at gcc dot gnu dot org
2006-09-20 22:35 ` mmitchel at gcc dot gnu dot org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-12 22:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-09-12 22:32 -------
Related to PR 19375.
Confirmed, a regression.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |19375
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |diagnostic
Known to fail| |3.4.0 4.0.0 4.1.0 4.2.0
Known to work| |3.3.3
Last reconfirmed|0000-00-00 00:00:00 |2006-09-12 22:32:01
date| |
Summary|"`x' is private" error |[4.0/4.1/4.2 Regression]
|duplicated when scope |"`x' is private" error
|specified |duplicated when scope
| |specified
Target Milestone|--- |4.0.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29048
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/29048] [4.0/4.1/4.2 Regression] "`x' is private" error duplicated when scope specified
2006-09-12 22:27 [Bug c++/29048] New: "`x' is private" error duplicated when scope specified herring at lanl dot gov
2006-09-12 22:32 ` [Bug c++/29048] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
@ 2006-09-20 22:35 ` mmitchel at gcc dot gnu dot org
2006-10-10 6:48 ` steven at gcc dot gnu dot org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-09-20 22:35 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29048
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/29048] [4.0/4.1/4.2 Regression] "`x' is private" error duplicated when scope specified
2006-09-12 22:27 [Bug c++/29048] New: "`x' is private" error duplicated when scope specified herring at lanl dot gov
2006-09-12 22:32 ` [Bug c++/29048] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-09-20 22:35 ` mmitchel at gcc dot gnu dot org
@ 2006-10-10 6:48 ` steven at gcc dot gnu dot org
2006-10-12 21:22 ` steven at gcc dot gnu dot org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: steven at gcc dot gnu dot org @ 2006-10-10 6:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from steven at gcc dot gnu dot org 2006-10-10 06:48 -------
I'll look into this.
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |steven at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2006-09-12 22:32:01 |2006-10-10 06:48:43
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29048
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/29048] [4.0/4.1/4.2 Regression] "`x' is private" error duplicated when scope specified
2006-09-12 22:27 [Bug c++/29048] New: "`x' is private" error duplicated when scope specified herring at lanl dot gov
` (2 preceding siblings ...)
2006-10-10 6:48 ` steven at gcc dot gnu dot org
@ 2006-10-12 21:22 ` steven at gcc dot gnu dot org
2007-02-03 20:09 ` [Bug c++/29048] [4.0/4.1/4.2/4.3 " gdr at gcc dot gnu dot org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: steven at gcc dot gnu dot org @ 2006-10-12 21:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from steven at gcc dot gnu dot org 2006-10-12 21:22 -------
I thought it would simply be a matter of using TREE_NO_WARNING ... until I
realized this was not a warning but an error.
Anyway, following the method of the fix for PR19375, I bootstrapped and tested
this patch below, but since this is a language issue and my understanding of
C++ is non-existing, I'm unassigning myself from this PR.
Index: semantics.c
===================================================================
--- semantics.c (revision 117672)
+++ semantics.c (working copy)
@@ -1559,8 +1559,12 @@ finish_qualified_id_expr (tree qualifyin
transformation, as there is no "this" pointer. */
;
else if (TREE_CODE (expr) == FIELD_DECL)
- expr = finish_non_static_data_member (expr, current_class_ref,
- qualifying_class);
+ {
+ push_deferring_access_checks (dk_no_check);
+ expr = finish_non_static_data_member (expr, current_class_ref,
+ qualifying_class);
+ pop_deferring_access_checks ();
+ }
else if (BASELINK_P (expr) && !processing_template_decl)
{
tree fns;
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|steven at gcc dot gnu dot |unassigned at gcc dot gnu
|org |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29048
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/29048] [4.0/4.1/4.2/4.3 Regression] "`x' is private" error duplicated when scope specified
2006-09-12 22:27 [Bug c++/29048] New: "`x' is private" error duplicated when scope specified herring at lanl dot gov
` (3 preceding siblings ...)
2006-10-12 21:22 ` steven at gcc dot gnu dot org
@ 2007-02-03 20:09 ` gdr at gcc dot gnu dot org
2007-02-03 21:01 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: gdr at gcc dot gnu dot org @ 2007-02-03 20:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from gdr at gcc dot gnu dot org 2007-02-03 20:09 -------
won't fix in GCC-4.0.x. Adjusting milestone.
--
gdr at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.0.4 |4.1.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29048
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/29048] [4.0/4.1/4.2/4.3 Regression] "`x' is private" error duplicated when scope specified
2006-09-12 22:27 [Bug c++/29048] New: "`x' is private" error duplicated when scope specified herring at lanl dot gov
` (4 preceding siblings ...)
2007-02-03 20:09 ` [Bug c++/29048] [4.0/4.1/4.2/4.3 " gdr at gcc dot gnu dot org
@ 2007-02-03 21:01 ` pinskia at gcc dot gnu dot org
2007-02-14 9:28 ` mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-02-03 21:01 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.1.3 |4.1.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29048
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/29048] [4.0/4.1/4.2/4.3 Regression] "`x' is private" error duplicated when scope specified
2006-09-12 22:27 [Bug c++/29048] New: "`x' is private" error duplicated when scope specified herring at lanl dot gov
` (5 preceding siblings ...)
2007-02-03 21:01 ` pinskia at gcc dot gnu dot org
@ 2007-02-14 9:28 ` mmitchel at gcc dot gnu dot org
2008-02-12 17:28 ` jason at gcc dot gnu dot org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-02-14 9:28 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.1.2 |4.1.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29048
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/29048] [4.0/4.1/4.2/4.3 Regression] "`x' is private" error duplicated when scope specified
2006-09-12 22:27 [Bug c++/29048] New: "`x' is private" error duplicated when scope specified herring at lanl dot gov
` (6 preceding siblings ...)
2007-02-14 9:28 ` mmitchel at gcc dot gnu dot org
@ 2008-02-12 17:28 ` jason at gcc dot gnu dot org
2008-02-12 19:26 ` jason at gcc dot gnu dot org
2008-02-12 19:29 ` jason at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu dot org @ 2008-02-12 17:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jason at gcc dot gnu dot org 2008-02-12 17:27 -------
Subject: Bug 29048
Author: jason
Date: Tue Feb 12 17:26:34 2008
New Revision: 132261
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132261
Log:
PR c++/29048
* semantics.c (finish_qualified_id_expr): Avoid duplicate access
check here, too.
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/semantics.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29048
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/29048] [4.0/4.1/4.2/4.3 Regression] "`x' is private" error duplicated when scope specified
2006-09-12 22:27 [Bug c++/29048] New: "`x' is private" error duplicated when scope specified herring at lanl dot gov
` (7 preceding siblings ...)
2008-02-12 17:28 ` jason at gcc dot gnu dot org
@ 2008-02-12 19:26 ` jason at gcc dot gnu dot org
2008-02-12 19:29 ` jason at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu dot org @ 2008-02-12 19:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jason at gcc dot gnu dot org 2008-02-12 19:26 -------
Subject: Bug 29048
Author: jason
Date: Tue Feb 12 19:25:28 2008
New Revision: 132265
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132265
Log:
PR c++/29048
* semantics.c (finish_qualified_id_expr): Avoid duplicate access
check here, too.
Added:
trunk/gcc/testsuite/g++.dg/lookup/duperr1.C
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29048
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/29048] [4.0/4.1/4.2/4.3 Regression] "`x' is private" error duplicated when scope specified
2006-09-12 22:27 [Bug c++/29048] New: "`x' is private" error duplicated when scope specified herring at lanl dot gov
` (8 preceding siblings ...)
2008-02-12 19:26 ` jason at gcc dot gnu dot org
@ 2008-02-12 19:29 ` jason at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu dot org @ 2008-02-12 19:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jason at gcc dot gnu dot org 2008-02-12 19:28 -------
Fixed for 4.3.0, not worth fixing on earlier release branches.
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29048
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2008-02-12 19:29 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-12 22:27 [Bug c++/29048] New: "`x' is private" error duplicated when scope specified herring at lanl dot gov
2006-09-12 22:32 ` [Bug c++/29048] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-09-20 22:35 ` mmitchel at gcc dot gnu dot org
2006-10-10 6:48 ` steven at gcc dot gnu dot org
2006-10-12 21:22 ` steven at gcc dot gnu dot org
2007-02-03 20:09 ` [Bug c++/29048] [4.0/4.1/4.2/4.3 " gdr at gcc dot gnu dot org
2007-02-03 21:01 ` pinskia at gcc dot gnu dot org
2007-02-14 9:28 ` mmitchel at gcc dot gnu dot org
2008-02-12 17:28 ` jason at gcc dot gnu dot org
2008-02-12 19:26 ` jason at gcc dot gnu dot org
2008-02-12 19:29 ` jason 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).