https://llvm.org/bugs/show_bug.cgi?id=26754
Bug ID: 26754 Summary: c++11 name inclusion without std=c++11 Product: libc++ Version: unspecified Hardware: PC OS: FreeBSD Status: NEW Severity: normal Priority: P Component: All Bugs Assignee: unassignedclangb...@nondot.org Reporter: fernando.apesteg...@gmail.com CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com Classification: Unclassified It seems that 'array' name is included into std namespace even if no -std=c++11 is specified. Here is a test program: #include <iostream> using namespace std; template<typename T> struct array { array(T t); }; using ::array; template<typename T> ::array<T>::array(T t) {} array<int> x(1); Compile with clang++ -c foo.cpp unless otherwise specified. Some results: FreeBSD 10.2 _LIBCPP_VERSION 1101 clang++ --version FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 Target: x86_64-unknown-freebsd10.2 Thread model: posix Compilation OK. ----------------------- FreeBSD 11.0-CURRENT foo.cpp:12:1: error: unknown type name 'array' array<int> x(1); ^ 2 errors generated clang 3.7.1 (tags/RELEASE_371/final 255217) Compilation FAILS ----------------------------- Ubuntu 14.04 clang++ --version Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4) Target: x86_64-pc-linux-gnu Thread model: posix Compilation OK If compiled with libc++ clang++ -c -stdlib=libc++ foo.cpp Compilation OK. ----------------------------- The problem was detected with cad/OpenVsp from our ports tree: http://www.freshports.org/cad/openvsp/ That program compiled fine in FreeBSD 9.x and 10.x but fails with the new clang/libc++ in 11-current. You can see the discussion here: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207253 I don't know if maybe I'm missing something obvious here... Please, let me know should you need me to run some tests. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs