Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clang warning #78

Closed
DarkerStar opened this issue Apr 26, 2020 · 7 comments
Closed

Clang warning #78

DarkerStar opened this issue Apr 26, 2020 · 7 comments

Comments

@DarkerStar
Copy link

(Sorry, accidentally hit wrong key and posted this while still writing - in fact while writing the title.)

Clang 11 generates a warning when compiling with just "-pedantic":

$ clang++ -pedantic -I/mnt/saturn/source/boost_1_72_0 -c -o main.o main.cpp
In file included from main.cpp:1:
In file included from /mnt/saturn/source/boost_1_72_0/boost/smart_ptr.hpp:19:
In file included from /mnt/saturn/source/boost_1_72_0/boost/shared_ptr.hpp:17:
In file included from /mnt/saturn/source/boost_1_72_0/boost/smart_ptr/shared_ptr.hpp:28:
In file included from /mnt/saturn/source/boost_1_72_0/boost/smart_ptr/detail/shared_count.hpp:29:
In file included from /mnt/saturn/source/boost_1_72_0/boost/smart_ptr/detail/sp_counted_base.hpp:45:
/mnt/saturn/source/boost_1_72_0/boost/smart_ptr/detail/sp_counted_base_clang.hpp:29:9: warning: '_Atomic' is a C11 extension [-Wc11-extensions]
typedef _Atomic( boost::int_least32_t ) atomic_int_least32_t;
        ^
1 warning generated.
$ cat main.cpp
#include <boost/smart_ptr.hpp>

int main() {}
$ clang++ --version
clang version 11.0.0-++20200414060218+d1a677cd33e-1~exp1~20200414040817.489 
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

(Boost 1.72.0 source acquired by downloading the tar.gz from the boost.org site.)

@pdimov
Copy link
Member

pdimov commented Apr 26, 2020

Where would we be without pedantry :-)

@pdimov
Copy link
Member

pdimov commented Apr 26, 2020

Is this warning new in Clang 11, or do earlier versions emit it too?

@DarkerStar
Copy link
Author

I only have 7, 8, and 9 installed, and Wandbox doesn't seem to support Boost with 10. It looks new in 11.

Edit: Godbolt has 10 + Boost. No warning there.

@pdimov
Copy link
Member

pdimov commented Apr 26, 2020

Godbolt uses -isystem, so it doesn't emit warnings from Boost.

@pdimov
Copy link
Member

pdimov commented Apr 26, 2020

Seems that Clang 10 also has it: https://godbolt.org/z/r2VGme

@pdimov
Copy link
Member

pdimov commented Apr 28, 2020

Should be fixed on develop by 066b398.

@DarkerStar
Copy link
Author

Yup, warning's gone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants