public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/37089] New: rvalue/lvalue reference collapsing not performed in error ouput thus printing "&&&"
@ 2008-08-11 22:40 chris dot fairles at gmail dot com
2008-08-16 22:43 ` [Bug c++/37089] " pinskia at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: chris dot fairles at gmail dot com @ 2008-08-11 22:40 UTC (permalink / raw)
To: gcc-bugs
template <class T>
void f(T&& a, bool);
template<class T>
void f(T&& a){
foo(std::forward<T>(a), true);
}
void f(int&& a, bool)
{ }
int main()
{
int a;
f(a);
}
"undefined reference to 'void f<int&>(int&&&, bool)'".
Note the "&&&" which I believe is int&& + int& which should be int&.
Chris
--
Summary: rvalue/lvalue reference collapsing not performed in
error ouput thus printing "&&&"
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: chris dot fairles at gmail dot com
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37089
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/37089] rvalue/lvalue reference collapsing not performed in error ouput thus printing "&&&"
2008-08-11 22:40 [Bug c++/37089] New: rvalue/lvalue reference collapsing not performed in error ouput thus printing "&&&" chris dot fairles at gmail dot com
@ 2008-08-16 22:43 ` pinskia at gcc dot gnu dot org
2008-08-16 22:57 ` paolo dot carlini at oracle dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-08-16 22:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2008-08-16 22:42 -------
This source does not compile at all so how can we get a link error?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37089
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/37089] rvalue/lvalue reference collapsing not performed in error ouput thus printing "&&&"
2008-08-11 22:40 [Bug c++/37089] New: rvalue/lvalue reference collapsing not performed in error ouput thus printing "&&&" chris dot fairles at gmail dot com
2008-08-16 22:43 ` [Bug c++/37089] " pinskia at gcc dot gnu dot org
@ 2008-08-16 22:57 ` paolo dot carlini at oracle dot com
2008-09-03 20:40 ` chris dot fairles at gmail dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-08-16 22:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from paolo dot carlini at oracle dot com 2008-08-16 22:55 -------
The below does compile (with -std=c++0x of course) and indeed the triple
ampersand is there.
////////////
#include <utility>
template <class T>
void f(T&& a, bool);
template<class T>
void f(T&& a){
f(std::forward<T>(a), true);
}
int main()
{
int a;
f(a);
}
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-08-16 22:55:47
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37089
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/37089] rvalue/lvalue reference collapsing not performed in error ouput thus printing "&&&"
2008-08-11 22:40 [Bug c++/37089] New: rvalue/lvalue reference collapsing not performed in error ouput thus printing "&&&" chris dot fairles at gmail dot com
2008-08-16 22:43 ` [Bug c++/37089] " pinskia at gcc dot gnu dot org
2008-08-16 22:57 ` paolo dot carlini at oracle dot com
@ 2008-09-03 20:40 ` chris dot fairles at gmail dot com
2009-06-02 14:25 ` jwakely dot gcc at gmail dot com
2009-06-03 2:48 ` cfairles at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: chris dot fairles at gmail dot com @ 2008-09-03 20:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from chris dot fairles at gmail dot com 2008-09-03 20:39 -------
Reduced testcase w/o the need for headers:
template<class T>
void f(T&& a, bool);
template<class T> void f(T&& a)
{
f(static_cast<T&&>(a), true);
}
int main()
{
int a;
f(a);
}
undefined reference to 'void f<int&>(int&&&, bool)'
(note: the mangled name is _Z1fIRiEvOT_b for what its worth)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37089
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/37089] rvalue/lvalue reference collapsing not performed in error ouput thus printing "&&&"
2008-08-11 22:40 [Bug c++/37089] New: rvalue/lvalue reference collapsing not performed in error ouput thus printing "&&&" chris dot fairles at gmail dot com
` (2 preceding siblings ...)
2008-09-03 20:40 ` chris dot fairles at gmail dot com
@ 2009-06-02 14:25 ` jwakely dot gcc at gmail dot com
2009-06-03 2:48 ` cfairles at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: jwakely dot gcc at gmail dot com @ 2009-06-02 14:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jwakely dot gcc at gmail dot com 2009-06-02 14:24 -------
I can't change it, but keyword should be diagnostic not link-error, the link
error occurs because the function is not defined, not because GCC generates the
wrong code
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37089
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/37089] rvalue/lvalue reference collapsing not performed in error ouput thus printing "&&&"
2008-08-11 22:40 [Bug c++/37089] New: rvalue/lvalue reference collapsing not performed in error ouput thus printing "&&&" chris dot fairles at gmail dot com
` (3 preceding siblings ...)
2009-06-02 14:25 ` jwakely dot gcc at gmail dot com
@ 2009-06-03 2:48 ` cfairles at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: cfairles at gcc dot gnu dot org @ 2009-06-03 2:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from cfairles at gcc dot gnu dot org 2009-06-03 02:47 -------
Agreed. Changed to diagnostic from link-error.
--
cfairles at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|link-failure |diagnostic
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37089
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-06-03 2:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-11 22:40 [Bug c++/37089] New: rvalue/lvalue reference collapsing not performed in error ouput thus printing "&&&" chris dot fairles at gmail dot com
2008-08-16 22:43 ` [Bug c++/37089] " pinskia at gcc dot gnu dot org
2008-08-16 22:57 ` paolo dot carlini at oracle dot com
2008-09-03 20:40 ` chris dot fairles at gmail dot com
2009-06-02 14:25 ` jwakely dot gcc at gmail dot com
2009-06-03 2:48 ` cfairles 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).