<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - failure on using Base::Base"
href="http://llvm.org/bugs/show_bug.cgi?id=19669">19669</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>failure on using Base::Base
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++11
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>rockeet@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>FILE: clang_other_error_dpgsUX.ii
--------------------------------------------------------------------------
# 1 "has_inheriting_cons.cpp"
# 1 "<built-in>" 1
# 1 "<built-in>" 3# 167 "<built-in>" 3# 1 "<command line>" 1# 1 "<built-in>" 2#
1 "has_inheriting_cons.cpp" 2struct A { A(int) {} A(int,int){}
};
struct B : public A {
using A::A;
};
int main() {
B b1(111); B b2(2,2);
return 0;
}
FILE: clang_other_error_dpgsUX.ii.stderr.txt
--------------------------------------------------------------------------
has_inheriting_cons.cpp:6:11: error: using declaration cannot refer to a
constructor
using A::A;
~~~^has_inheriting_cons.cpp:9:4: error: no matching constructor
for initialization of 'B' B b1(111); ^
~~~has_inheriting_cons.cpp:5:8: note: candidate constructor (the implicit copy
constructor) not viable: no known conversion from 'int' to 'const B' for 1st
argumentstruct B : public A { ^has_inheriting_cons.cpp:5:8: note:
candidate constructor (the implicit default constructor) not viable: requires 0
arguments, but 1 was provided
has_inheriting_cons.cpp:10:4: error: no matching constructor for initialization
of 'B'
B b2(2,2);
^ ~~~
has_inheriting_cons.cpp:5:8: note: candidate constructor (the implicit default
constructor) not viable: requires 0 arguments, but 2 were provided
struct B : public A {
^has_inheriting_cons.cpp:5:8: note: candidate constructor (the implicit
copy constructor) not viable: requires 1 argument, but 2 were provided
3 errors generated.
FILE: clang_other_error_dpgsUX.ii.info.txt
--------------------------------------------------------------------------
/home/leipeng/osc/b/febird/has_inheriting_cons.cpp
Other Error
-cc1 -triple x86_64-unknown-linux-gnu -fsyntax-only -disable-free
-main-file-name has_inheriting_cons.cpp -mrelocation-model static
-mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -fuse-init-array -target-cpu x86-64 -target-linker-version
2.17.50.0.6 -resource-dir
/home/leipeng/osc/llvm-build/Release+Asserts/bin/../lib/clang/3.5.0
-internal-isystem
/home/leipeng/opt/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/c++/4.7.1
-internal-isystem
/home/leipeng/opt/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/c++/4.7.1/x86_64-unknown-linux-gnu
-internal-isystem
/home/leipeng/opt/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/c++/4.7.1/backward
-internal-isystem
/home/leipeng/opt/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/x86_64-unknown-linux-gnu/c++/4.7.1
-internal-isystem /usr/local/include -internal-isystem
/home/leipeng/osc/llvm-build/Release+Asserts/bin/../lib/clang/3.5.0/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdeprecated-macro -fdebug-compilation-dir /home/leipeng/osc/b/febird
-ferror-limit 19 -fmessage-length 0 -mstackrealign -fobjc-runtime=gcc
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -vectorize-slp -x c++
has_inheriting_cons.cpp
Linux xjydev2.corp.qihoo.net 2.6.18-308.8.2.el5 #1 SMP Tue Jun 12 09:58:12 EDT
2012 x86_64 x86_64 x86_64 GNU/Linux
使用内建 specs。
COLLECT_GCC=/home/leipeng/opt/gcc-4.9/bin/g++
COLLECT_LTO_WRAPPER=/home/leipeng/opt/gcc-4.9/libexec/gcc/x86_64-unknown-linux-gnu/4.9.1/lto-wrapper
目标:x86_64-unknown-linux-gnu
配置为:../configure --prefix=/home/leipeng/opt/gcc-4.9
--with-gmp=/home/leipeng/opt --with-ppl=/home/leipeng/opt
--with-cloog=/home/leipeng/opt --with-mpfr=/home/leipeng/opt
--with-mpc=/home/leipeng/opt --disable-ppl-version-check --disable-multilib
--enable-gold --enable-ld
线程模型:posix
gcc 版本 4.9.1 20140430 (prerelease) (GCC)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>