[Bug 1751199] Re: g++-5 fails to compile c++11 code with -std=c++11 on Ubuntu 17.10
Abhishek
1751199 at bugs.launchpad.net
Sat Feb 24 10:09:43 UTC 2018
*** This bug is a duplicate of bug 1739778 ***
https://bugs.launchpad.net/bugs/1739778
** This bug has been marked a duplicate of bug 1739778
G++ 5.4 does not compile some C++11 code without workaround flag
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-5 in Ubuntu.
https://bugs.launchpad.net/bugs/1751199
Title:
g++-5 fails to compile c++11 code with -std=c++11 on Ubuntu 17.10
Status in gcc-5 package in Ubuntu:
New
Bug description:
How to reproduce:
=================
1. Install g++-5 with `sudo apt install g++-5`
2. Try compiling the following C++11 code:
cat << END > a.cpp
#include <iostream>
#include <string>
int main()
{ std::cout<<std::stoi("1234"); return 0; }
END
g++-5 -std=c++11 a.cpp
3. What happened: Fails with error:
a.cpp: In function ‘int main()’:
a.cpp:4:17: error: ‘stoi’ is not a member of ‘std’
{ std::cout<<std::stoi("1234"); return 0; }
^
4. What is expected: No error. Successful compilation.
Version information:
====================
lsb_release -rd
Description: Ubuntu 17.10
Release: 17.10
g++-5 --version
g++-5 (Ubuntu 5.5.0-1ubuntu2) 5.4.1 20171010
Additional comments:
====================
I tested the same code in Ubuntu 16.04 with g++-5 (g++-5 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609) and it compiles fine on it.
ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: g++-5 5.5.0-1ubuntu2
ProcVersionSignature: Ubuntu 4.13.0-32.35-generic 4.13.13
Uname: Linux 4.13.0-32-generic x86_64
ApportVersion: 2.20.7-0ubuntu3.7
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Fri Feb 23 11:19:16 2018
EcryptfsInUse: Yes
InstallationDate: Installed on 2018-01-02 (51 days ago)
InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Release amd64 (20171018)
SourcePackage: gcc-5
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-5/+bug/1751199/+subscriptions
More information about the foundations-bugs
mailing list