[LLVMbugs] [Bug 19669] New: failure on using Base::Base

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue May 6 18:44:14 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=19669

            Bug ID: 19669
           Summary: failure on using Base::Base
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: rockeet at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

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)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140507/3f9f4066/attachment.html>


More information about the llvm-bugs mailing list