[cfe-users] -std=c++1y apparently uses gcc4.8 includes and gives many errors with a hello_world.cpp

Larry Evans cppljevans at suddenlink.net
Sun Jul 6 15:42:20 PDT 2014


On 07/05/2014 03:43 PM, Larry Evans wrote:
> When compiled with:
>    -std=c++11
> the simple hello_world.cpp:
>
> #include <iostream>
> int main()
> {
>    std::cout<<"hello World\n";
>    return 0;
> }
>
> runs OK; however, with:
>    -std=c++1y
> it gives error:
>
> clang++ -std=c++1y hello_world.cpp -o hello_world.exe
> In file included from hello_world.cpp:1:
[snip]
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/cstdio:120:11:
> error: no member named 'gets' in the global namespace
>    using ::gets;
>          ~~^
> 1 error generated.
>
[snip]
This problem also reported here:

http://stackoverflow.com/questions/17775390/clang-3-3-in-c1y-mode-cannot-parse-cstdio-header

Will try solutions mentioned there if no one here has
any better suggestions.

-regards,
Larry






More information about the cfe-users mailing list