kazuho / picojson

a header-file-only, JSON parser serializer in C++
BSD 2-Clause "Simplified" License
1.12k stars 222 forks source link

_serialize collides wtih immintrin.h #141

Open nishiken opened 3 years ago

nishiken commented 3 years ago

Using fedora34, gcc 11.1.1 immintrin.h seems to invoke the errors in picojson.h.

/usr/lib/gcc/x86_64-redhat-linux/11/include/serializeintrin.h:37: note: macro "_serialize" defined here 37 | #define _serialize() __builtin_ia32_serialize ()

https://software.intel.com/content/www/us/en/develop/documentation/cpp-compiler-developer-guide-and-reference/top/compiler-reference/intrinsics/intrinsics-for-instruction-set-architecture-isa-instructions/serialize/serialize-1.html

f18m commented 2 years ago

Hi I hit this problem as well. I see other projects are fixing this issue by renaming serialize in picojson with serialize: https://gitlab.onelab.info/gmsh/gmsh/-/merge_requests/434/diffs

I'd love to see this fixes upstream :)

f18m commented 2 years ago

One other note: this issue is making the "picojson-devel-1.3.0-11.fc34.x86_64" package of Fedora 34 and 35 unusable... :(