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

Compilation errors with gcc 4.9 through 7 due to unknown no_sanitize attribute #291

Closed
Lastique opened this issue Aug 25, 2023 · 5 comments

Comments

@Lastique
Copy link
Member

Lastique commented Aug 25, 2023

Gcc from 4.9 to 7, inclusively, fail to compile code using Boost.Serialization because of the unsupported no_sanitize attribute used in boost/archive/detail/common_oarchive.hpp. This has manifested as Boost.Core CI failures like this:

In file included from ./boost/archive/detail/common_oarchive.hpp:22:0,
                 from ./boost/archive/basic_xml_oarchive.hpp:22,
                 from ./boost/archive/xml_oarchive.hpp:31,
                 from libs/core/test/serialization_nvp_test.cpp:24:
./boost/archive/detail/interface_oarchive.hpp:54:20: error: 'no_sanitize' attribute directive ignored [-Werror=attributes]
     Archive * This(){
                    ^
cc1plus: all warnings being treated as errors

    "g++-4.9"   -std=c++03 -fvisibility-inlines-hidden -fPIC -m32 -pthread -O0 -fno-inline -Wall -Wextra -Werror -g -fvisibility=hidden -march=i686  -DBOOST_ALL_NO_LIB=1   -I"."  -c -o "bin.v2/libs/core/test/serialization_nvp_test.test/gcc-4.9/debug/address-model-32/cxxstd-03-iso/threading-multi/visibility-hidden/serialization_nvp_test.o" "libs/core/test/serialization_nvp_test.cpp"

This regression was introduced by be9421f. CC @mborland.

@Lastique
Copy link
Member Author

BTW, the clang check in the referenced commit should probably be replaced with __has_attribute.

@pdimov
Copy link
Member

pdimov commented Aug 25, 2023

#292 should be the better fix, although I see CI failures there.

@pdimov
Copy link
Member

pdimov commented Aug 25, 2023

Oh, those are because of C++03.

@robertramey
Copy link
Member

can I close this now?

@pdimov
Copy link
Member

pdimov commented Oct 21, 2023

I think so, yes.

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

3 participants