public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/50595] New: template overload resolution insufficiently sensitive to name dependency?
@ 2011-10-03 4:14 zackw at panix dot com
2011-10-03 10:05 ` [Bug c++/50595] " paolo.carlini at oracle dot com
2014-08-13 13:36 ` zackw at panix dot com
0 siblings, 2 replies; 3+ messages in thread
From: zackw at panix dot com @ 2011-10-03 4:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50595
Bug #: 50595
Summary: template overload resolution insufficiently sensitive
to name dependency?
Classification: Unclassified
Product: gcc
Version: 4.6.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: zackw@panix.com
Created attachment 25401
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25401
test case
Per http://stackoverflow.com/questions/7630806 the expected output of the
attached test case should be
f(char): 1
f(int): T(1)
f(int): t
f(char): 1
f(char): T(1)
f(char): t
since the second and third calls to f() in g() have arguments that are
template-dependent, so resolution of *those* function calls (but not the first
call) should be deferred until the point of instantiation (h()), at which time
both f(int) and f(char) are visible. What actually happens with g++ 4.6 is
f(char): 1
f(char): T(1)
f(char): t
f(char): 1
f(char): T(1)
f(char): t
I'm not 100% convinced by the argument above, but I am convinced enough to see
what y'all think.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/50595] template overload resolution insufficiently sensitive to name dependency?
2011-10-03 4:14 [Bug c++/50595] New: template overload resolution insufficiently sensitive to name dependency? zackw at panix dot com
@ 2011-10-03 10:05 ` paolo.carlini at oracle dot com
2014-08-13 13:36 ` zackw at panix dot com
1 sibling, 0 replies; 3+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-03 10:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50595
--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-03 10:04:17 UTC ---
Without having looked at the code, ICC behaves exactly like GCC.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/50595] template overload resolution insufficiently sensitive to name dependency?
2011-10-03 4:14 [Bug c++/50595] New: template overload resolution insufficiently sensitive to name dependency? zackw at panix dot com
2011-10-03 10:05 ` [Bug c++/50595] " paolo.carlini at oracle dot com
@ 2014-08-13 13:36 ` zackw at panix dot com
1 sibling, 0 replies; 3+ messages in thread
From: zackw at panix dot com @ 2014-08-13 13:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50595
Zack Weinberg <zackw at panix dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #2 from Zack Weinberg <zackw at panix dot com> ---
Per http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#197 GCC's
behavior is correct.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-13 13:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-03 4:14 [Bug c++/50595] New: template overload resolution insufficiently sensitive to name dependency? zackw at panix dot com
2011-10-03 10:05 ` [Bug c++/50595] " paolo.carlini at oracle dot com
2014-08-13 13:36 ` zackw at panix dot com
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).