public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11859] New: Substitution failure incorrectly reported as error in SFINAE situation.
@ 2003-08-08 22:53 gccbugs at contacts dot eelis dot net
2003-08-09 3:28 ` [Bug c++/11859] " gccbugs at contacts dot eelis dot net
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: gccbugs at contacts dot eelis dot net @ 2003-08-08 22:53 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11859
Summary: Substitution failure incorrectly reported as error in
SFINAE situation.
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gccbugs at contacts dot eelis dot net
CC: gcc-bugs at gcc dot gnu dot org
GCC rejects the following legal code:
template <int> struct ItT {};
template <typename T> typename T::x f ();
template <typename T> void g (ItT<sizeof(f<T>(0))> *);
template <typename> void g (...);
void h () { g<int>(0); }
During the consideration of the first g() for the call in h(), the failure to
resolve T::x should not be considered an error and the second g() should be
chosen. GCC however reports:
t.cpp:5: error: no matching function for call to `f(int)'
Comeau (4.3.3 beta) compiles the code without problems.
I'm using GCC version 3.4 20030723.
Note: I'm not 100% sure GCC is wrong here, this is quite complex since this
involves a template function lookup during another template function lookup, and
Comeau might be wrong after all.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/11859] Substitution failure incorrectly reported as error in SFINAE situation.
2003-08-08 22:53 [Bug c++/11859] New: Substitution failure incorrectly reported as error in SFINAE situation gccbugs at contacts dot eelis dot net
@ 2003-08-09 3:28 ` gccbugs at contacts dot eelis dot net
2003-08-11 14:38 ` lerdsuwa at gcc dot gnu dot org
2003-08-23 1:13 ` dhazeghi at yahoo dot com
2 siblings, 0 replies; 5+ messages in thread
From: gccbugs at contacts dot eelis dot net @ 2003-08-09 3:28 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11859
------- Additional Comments From gccbugs at contacts dot eelis dot net 2003-08-09 03:28 -------
Simplification:
The f function template can be replaced by:
template <typename T> T f ();
Resolving T::x is not the problem after all; the mere incompatibility between
f<>'s signature and how f is called causes the failure that should lead to
selection of the second g() instead of being reported as an error (according to
Comeau). The T in the signature does seem to be essential.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/11859] Substitution failure incorrectly reported as error in SFINAE situation.
2003-08-08 22:53 [Bug c++/11859] New: Substitution failure incorrectly reported as error in SFINAE situation gccbugs at contacts dot eelis dot net
2003-08-09 3:28 ` [Bug c++/11859] " gccbugs at contacts dot eelis dot net
@ 2003-08-11 14:38 ` lerdsuwa at gcc dot gnu dot org
2003-08-23 1:13 ` dhazeghi at yahoo dot com
2 siblings, 0 replies; 5+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2003-08-11 14:38 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11859
lerdsuwa at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-08-11 14:38:39
date| |
------- Additional Comments From lerdsuwa at gcc dot gnu dot org 2003-08-11 14:38 -------
Confirmed. All GCC versions dated back to 2.95 also fails
with the same error. So it's not a regression.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/11859] Substitution failure incorrectly reported as error in SFINAE situation.
2003-08-08 22:53 [Bug c++/11859] New: Substitution failure incorrectly reported as error in SFINAE situation gccbugs at contacts dot eelis dot net
2003-08-09 3:28 ` [Bug c++/11859] " gccbugs at contacts dot eelis dot net
2003-08-11 14:38 ` lerdsuwa at gcc dot gnu dot org
@ 2003-08-23 1:13 ` dhazeghi at yahoo dot com
2 siblings, 0 replies; 5+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-08-23 1:13 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11859
dhazeghi at yahoo dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Target Milestone|3.4 |---
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/11859] Substitution failure incorrectly reported as error in SFINAE situation.
[not found] <bug-11859-5473@http.gcc.gnu.org/bugzilla/>
@ 2008-03-30 0:43 ` reichelt at gcc dot gnu dot org
0 siblings, 0 replies; 5+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-03-30 0:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from reichelt at gcc dot gnu dot org 2008-03-30 00:42 -------
Fixed on mainline by Douglas' patch:
2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
* typeck.c (composite_pointer_type_r): Add SFINAE support.
...
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |doug dot gregor at gmail dot
| |com
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11859
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-03-30 0:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-08 22:53 [Bug c++/11859] New: Substitution failure incorrectly reported as error in SFINAE situation gccbugs at contacts dot eelis dot net
2003-08-09 3:28 ` [Bug c++/11859] " gccbugs at contacts dot eelis dot net
2003-08-11 14:38 ` lerdsuwa at gcc dot gnu dot org
2003-08-23 1:13 ` dhazeghi at yahoo dot com
[not found] <bug-11859-5473@http.gcc.gnu.org/bugzilla/>
2008-03-30 0:43 ` reichelt 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).