Clang 3.6 cannot compile program with -std=c++14
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
llvm-toolchain-3.6 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Clang 3.6 provided by Ubuntu claims to support C++14. -std=c++14 is not rejected by the compiler during feature testing.
Attempting to compile a test program:
$ cat test.cxx
#include <string>
int main(int argc, char* argv[])
{
return 0;
}
Results in the following:
$ clang++ -std=c++14 test.cxx -o test.exe
In file included from test.cxx:1:
In file included from /usr/bin/
In file included from /usr/bin/
In file included from /usr/bin/
/usr/bin/
no member named 'gets' in the global namespace
using ::gets;
~~^
1 error generated.
**********
$ clang++ -v
Ubuntu clang version 3.6.0-2ubuntu1~
Target: x86_64-pc-linux-gnu
Thread model: posix
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty
**********
$ cat /etc/apt/
deb http://
deb-src http://
deb http://
deb-src http://
deb http://
deb-src http://
deb http://
deb-src http://
deb http://
deb-src http://
deb http://
deb-src http://
deb http://
deb-src http://
deb http://
deb-src http://
deb http://
deb-src http://
deb http://
deb-src http://
GCC simply rejects the argument:
$ g++ -std=c++14 test.cxx -o test.exe
g++: error: unrecognized command line option ‘-std=c++14’