public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/21146] unable to resolve visible symbol
[not found] <bug-21146-5779@http.gcc.gnu.org/bugzilla/>
@ 2007-04-09 17:32 ` reichelt at gcc dot gnu dot org
2007-11-15 16:30 ` manu at gcc dot gnu dot org
2009-02-07 20:18 ` manu at gcc dot gnu dot org
2 siblings, 0 replies; 6+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-04-09 17:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from reichelt at gcc dot gnu dot org 2007-04-09 18:32 -------
Btw, since GCC 4.1.0 the error message is:
bug.cc:13: error: reference to 'S' is ambiguous
bug.cc:4: error: candidates are: typedef struct S A<S>::S
bug.cc:7: error: struct S
bug.cc:13: error: template argument 1 is invalid
bug.cc:13: error: friend declaration does not name a class or function
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21146
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/21146] unable to resolve visible symbol
[not found] <bug-21146-5779@http.gcc.gnu.org/bugzilla/>
2007-04-09 17:32 ` [Bug c++/21146] unable to resolve visible symbol reichelt at gcc dot gnu dot org
@ 2007-11-15 16:30 ` manu at gcc dot gnu dot org
2009-02-07 20:18 ` manu at gcc dot gnu dot org
2 siblings, 0 replies; 6+ messages in thread
From: manu at gcc dot gnu dot org @ 2007-11-15 16:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from manu at gcc dot gnu dot org 2007-11-15 16:30 -------
So, is this a bug or not? Do we know how icc resolves the ambiguity?
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu dot org
Keywords| |diagnostic
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21146
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/21146] unable to resolve visible symbol
[not found] <bug-21146-5779@http.gcc.gnu.org/bugzilla/>
2007-04-09 17:32 ` [Bug c++/21146] unable to resolve visible symbol reichelt at gcc dot gnu dot org
2007-11-15 16:30 ` manu at gcc dot gnu dot org
@ 2009-02-07 20:18 ` manu at gcc dot gnu dot org
2 siblings, 0 replies; 6+ messages in thread
From: manu at gcc dot gnu dot org @ 2009-02-07 20:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from manu at gcc dot gnu dot org 2009-02-07 20:18 -------
This still fails in GCC 4.4
icc accepts the code in strict mode, so I guess this is rejects-valid.
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |rejects-valid
Known to fail| |4.4.0
Last reconfirmed|0000-00-00 00:00:00 |2009-02-07 20:18:28
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21146
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/21146] unable to resolve visible symbol
[not found] <bug-21146-4@http.gcc.gnu.org/bugzilla/>
@ 2020-08-26 11:09 ` redi at gcc dot gnu.org
0 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2020-08-26 11:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21146
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=13590
Last reconfirmed|2009-02-07 20:18:28 |2020-8-26
Blocks|65608 |94404
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Manuel López-Ibáñez from comment #4)
> Do we know how icc resolves the ambiguity?
I assume it checks that the two lookup results for "S" actually name the same
type, and so decides there's no ambiguity.
I think that is correct according to [class.member.lookup]. The declaration
sets for lookup of S in ::C and in ::B and in :S and in ::A<::S> all find the
same type, ::S. So there is no ambiguity.
This was ambiguous in C++03 but that was changed by CWG 39
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#39
So GCC is wrong.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65608
[Bug 65608] [meta-bug] friend issues
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94404
[Bug 94404] [meta-bug] C++ core issues
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/21146] unable to resolve visible symbol
2005-04-21 11:01 [Bug c++/21146] New: " boris at kolpackov dot net
2005-04-21 12:59 ` [Bug c++/21146] " pinskia at gcc dot gnu dot org
@ 2005-05-02 18:54 ` bangerth at dealii dot org
1 sibling, 0 replies; 6+ messages in thread
From: bangerth at dealii dot org @ 2005-05-02 18:54 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2005-05-02 18:54 -------
What is going wrong is this: the name 'S' may refer to both the local
typedef in the base class 'A' as well as to the global structure '::S'.
If I write either
friend class A< A< ::S>::S>;
or
friend class A< ::S>;
then the code is accepted by gcc.
I don't know whether the ambiguity makes the code invalid. As a reference
point, icc accepts the code in strict mode.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21146
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/21146] unable to resolve visible symbol
2005-04-21 11:01 [Bug c++/21146] New: " boris at kolpackov dot net
@ 2005-04-21 12:59 ` pinskia at gcc dot gnu dot org
2005-05-02 18:54 ` bangerth at dealii dot org
1 sibling, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-21 12:59 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-21 12:59 -------
3.3.3 gave:
t.cc:13: error: request for member `S' is ambiguous in multiple inheritance
lattice
t.cc:7: error: candidates are: struct S
t.cc:4: error: typedef struct S A<S>::S
t.cc:13: error: template argument 1 is invalid
t.cc:13: error: ISO C++ forbids declaration of `type name' with no type
If the code is invalid, then we have a diagnostic regression.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21146
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-08-26 11:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-21146-5779@http.gcc.gnu.org/bugzilla/>
2007-04-09 17:32 ` [Bug c++/21146] unable to resolve visible symbol reichelt at gcc dot gnu dot org
2007-11-15 16:30 ` manu at gcc dot gnu dot org
2009-02-07 20:18 ` manu at gcc dot gnu dot org
[not found] <bug-21146-4@http.gcc.gnu.org/bugzilla/>
2020-08-26 11:09 ` redi at gcc dot gnu.org
2005-04-21 11:01 [Bug c++/21146] New: " boris at kolpackov dot net
2005-04-21 12:59 ` [Bug c++/21146] " pinskia at gcc dot gnu dot org
2005-05-02 18:54 ` bangerth at dealii 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).