[LLVMbugs] [Bug 12007] New: libc++ (trunk) fails to build with clang++ 3.1 (trunk) b/c of <chrono> errors
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Feb 15 00:17:01 PST 2012
http://llvm.org/bugs/show_bug.cgi?id=12007
Bug #: 12007
Summary: libc++ (trunk) fails to build with clang++ 3.1 (trunk)
b/c of <chrono> errors
Product: libc++
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
AssignedTo: hhinnant at apple.com
ReportedBy: marc.mutz at kdab.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 8052
--> http://llvm.org/bugs/attachment.cgi?id=8052
Full compile log
Clang++ --version:
clang version 3.1 (trunk 150388)
Target: x86_64-unknown-linux-gnu
Thread model: posix
Errors:
+ clang++ -c -g -Os -fPIC -std=c++0x -fstrict-aliasing -Wall -Wextra -Wshadow
-Wconversion -Wnewline-eof -Wpadded -Wmissing-prototypes -Wstrict-aliasing=2
-Wstrict-overflow=4 -nostdinc++ -I../include ../src/chrono.cpp
In file included from ../src/chrono.cpp:10:
../include/chrono:401:19: error: binding of reference to type 'long long' to a
value of type 'const long long' drops qualifiers
: __rep_(__r) {}
^ ~~~
../include/chrono:334:16: note: in instantiation of function template
specialization 'std::__1::chrono::duration<long long &&, std::__1::ratio<1,
1000000>
>::duration<long long>' requested here
return _ToDuration(static_cast<typename _ToDuration::rep>(
^
../include/chrono:361:12: note: in instantiation of member function
'std::__1::chrono::__duration_cast<std::__1::chrono::duration<long long,
std::__1::ratio<1, 1> >,
std::__1::chrono::duration<long long &&, std::__1::ratio<1, 1000000> >,
std::__1::ratio<1000000, 1>, false, true>::operator()' requested here
return __duration_cast<duration<_Rep, _Period>, _ToDuration>()(__fd);
^
../include/chrono:413:26: note: in instantiation of function template
specialization 'std::__1::chrono::duration_cast<std::__1::chrono::duration<long
long &&,
std::__1::ratio<1, 1000000> >, long long, std::__1::ratio<1, 1> >'
requested here
: __rep_(_VSTD::chrono::duration_cast<duration>(__d).count())
{}
^
../include/__config:251:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_NAMESPACE
^
../include/chrono:555:93: note: in instantiation of function template
specialization 'std::__1::chrono::duration<long long &&, std::__1::ratio<1,
1000000>
>::duration<long long, std::__1::ratio<1, 1> >' requested here
typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2>
>::type __r = __lhs;
^
../src/chrono.cpp:32:42: note: in instantiation of function template
specialization 'std::__1::chrono::operator+<long long, std::__1::ratio<1, 1>,
long long,
std::__1::ratio<1, 1000000> >' requested here
return time_point(seconds(tv.tv_sec) + microseconds(tv.tv_usec));
^
In file included from ../src/chrono.cpp:10:
../include/chrono:417:57: error: rvalue reference to type 'long long' cannot
bind to lvalue of type 'long long'
_LIBCPP_INLINE_VISIBILITY rep count() const {return __rep_;}
^~~~~~
../include/chrono:413:70: note: in instantiation of member function
'std::__1::chrono::duration<long long &&, std::__1::ratio<1, 1000000> >::count'
requested here
: __rep_(_VSTD::chrono::duration_cast<duration>(__d).count())
{}
^
../include/chrono:555:93: note: in instantiation of function template
specialization 'std::__1::chrono::duration<long long &&, std::__1::ratio<1,
1000000>
>::duration<long long, std::__1::ratio<1, 1> >' requested here
typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2>
>::type __r = __lhs;
^
../src/chrono.cpp:32:42: note: in instantiation of function template
specialization 'std::__1::chrono::operator+<long long, std::__1::ratio<1, 1>,
long long,
std::__1::ratio<1, 1000000> >' requested here
return time_point(seconds(tv.tv_sec) + microseconds(tv.tv_usec));
^
In file included from ../src/chrono.cpp:10:
../include/chrono:311:16: error: no matching conversion for functional-style
cast from 'long long' to 'std::__1::chrono::duration<long long &&,
std::__1::ratio<1,
1000000> >'
return _ToDuration(static_cast<typename
_ToDuration::rep>(__fd.count()));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/chrono:361:12: note: in instantiation of member function
'std::__1::chrono::__duration_cast<std::__1::chrono::duration<long long,
std::__1::ratio<1,
1000000> >, std::__1::chrono::duration<long long &&, std::__1::ratio<1,
1000000> >, std::__1::ratio<1, 1>, true, true>::operator()' requested here
return __duration_cast<duration<_Rep, _Period>, _ToDuration>()(__fd);
^
../include/chrono:413:26: note: in instantiation of function template
specialization 'std::__1::chrono::duration_cast<std::__1::chrono::duration<long
long &&,
std::__1::ratio<1, 1000000> >, long long, std::__1::ratio<1, 1000000> >'
requested here
: __rep_(_VSTD::chrono::duration_cast<duration>(__d).count())
{}
^
../include/__config:251:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_NAMESPACE
^
../include/chrono:556:12: note: in instantiation of function template
specialization 'std::__1::chrono::duration<long long &&, std::__1::ratio<1,
1000000>
>::duration<long long, std::__1::ratio<1, 1000000> >' requested here
__r += __rhs;
^
../src/chrono.cpp:32:42: note: in instantiation of function template
specialization 'std::__1::chrono::operator+<long long, std::__1::ratio<1, 1>,
long long,
std::__1::ratio<1, 1000000> >' requested here
return time_point(seconds(tv.tv_sec) + microseconds(tv.tv_usec));
^
../include/chrono:379:23: note: candidate constructor (the implicit copy
constructor) not viable: no known conversion from 'long long' to 'const
std::__1::chrono::duration<long long &&, std::__1::ratio<1, 1000000> >'
for 1st argument;
class _LIBCPP_VISIBLE duration
^
../include/chrono:379:23: note: candidate constructor (the implicit move
constructor) not viable: no known conversion from 'long long' to
'std::__1::chrono::duration<long long &&, std::__1::ratio<1, 1000000> >'
for 1st argument;
class _LIBCPP_VISIBLE duration
^
../include/chrono:394:18: note: candidate template ignored: substitution
failure [with _Rep2 = long long]
explicit duration(const _Rep2& __r,
^
../include/chrono:406:9: note: candidate template ignored: failed template
argument deduction
duration(const duration<_Rep2, _Period2>& __d,
^
../include/chrono:391:31: note: candidate constructor not viable: requires 0
arguments, but 1 was provided
_LIBCPP_INLINE_VISIBILITY duration() {} // = default;
^
[...]
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list