public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/16560] New: error with inner class declaring operator=
@ 2004-07-15 9:23 larsbj at lyx dot org
2004-07-15 9:25 ` [Bug c++/16560] " larsbj at lyx dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: larsbj at lyx dot org @ 2004-07-15 9:23 UTC (permalink / raw)
To: gcc-bugs
This snippet works with gcc 3.3 and 3.4, but fails on 3.5.
g++ (GCC) 3.5.0 20040715 (experimental)
class Foo {};
class Bar : public Foo {
public:
struct Item {
Item & operator=(Item const &);
};
};
g++ -c test.C -o test.o
test.C:3: error: declaration of `Bar& Bar::operator=(const Bar&)'
test.C:1: error: conflicts with previous declaration `Foo& Foo::operator=(const
Foo&)'
Please tell if you need the preprocessed sources.
--
Summary: error with inner class declaring operator=
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: larsbj at lyx dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16560
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/16560] error with inner class declaring operator=
2004-07-15 9:23 [Bug c++/16560] New: error with inner class declaring operator= larsbj at lyx dot org
@ 2004-07-15 9:25 ` larsbj at lyx dot org
2004-07-15 11:52 ` bangerth at dealii dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: larsbj at lyx dot org @ 2004-07-15 9:25 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |3.5.0
Known to work| |3.3.3 3.4.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16560
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/16560] error with inner class declaring operator=
2004-07-15 9:23 [Bug c++/16560] New: error with inner class declaring operator= larsbj at lyx dot org
2004-07-15 9:25 ` [Bug c++/16560] " larsbj at lyx dot org
@ 2004-07-15 11:52 ` bangerth at dealii dot org
2004-07-15 14:16 ` [Bug c++/16560] [3.5 Regression] " pinskia at gcc dot gnu dot org
2004-07-15 16:02 ` mmitchel at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: bangerth at dealii dot org @ 2004-07-15 11:52 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-07-15 11:51 -------
Confirmed. Note that the compiler error refers to the operator= in class
Bar, not Bar::Item. If one removes the declaration in Bar::Item, then the
error message goes away. It looks as if someone was looking up a name in
the wrong scope.
Mark, could this be related to your push_/pop_* work?
W.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |mmitchel at gcc dot gnu dot
| |org
Severity|normal |critical
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-07-15 11:52:04
date| |
Target Milestone|--- |3.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16560
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/16560] [3.5 Regression] error with inner class declaring operator=
2004-07-15 9:23 [Bug c++/16560] New: error with inner class declaring operator= larsbj at lyx dot org
2004-07-15 9:25 ` [Bug c++/16560] " larsbj at lyx dot org
2004-07-15 11:52 ` bangerth at dealii dot org
@ 2004-07-15 14:16 ` pinskia at gcc dot gnu dot org
2004-07-15 16:02 ` mmitchel at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-15 14:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-15 14:16 -------
Guess what I saw something like this when compiling QT also.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Summary|error with inner class |[3.5 Regression] error with
|declaring operator= |inner class declaring
| |operator=
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16560
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/16560] [3.5 Regression] error with inner class declaring operator=
2004-07-15 9:23 [Bug c++/16560] New: error with inner class declaring operator= larsbj at lyx dot org
` (2 preceding siblings ...)
2004-07-15 14:16 ` [Bug c++/16560] [3.5 Regression] " pinskia at gcc dot gnu dot org
@ 2004-07-15 16:02 ` mmitchel at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-07-15 16:02 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-07-15 16:02 -------
I failed to check in the name-lookup.c changes that I posted here:
http://gcc.gnu.org/ml/gcc-patches/2004-07/msg01493.html
Those changes fix this problem.
I've now applied that patch.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16560
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-07-15 16:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-15 9:23 [Bug c++/16560] New: error with inner class declaring operator= larsbj at lyx dot org
2004-07-15 9:25 ` [Bug c++/16560] " larsbj at lyx dot org
2004-07-15 11:52 ` bangerth at dealii dot org
2004-07-15 14:16 ` [Bug c++/16560] [3.5 Regression] " pinskia at gcc dot gnu dot org
2004-07-15 16:02 ` mmitchel 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).