You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
restrict is technically only a keyword in C, not C++ yet this header needs to be includible from either. Most C++ compilers I guess either accept it as an extension or doesn't set __STDC_VERSION__ incorrectly. However, one host in my build farm (a Solaris x86_64 machine with gcc 4.7.3) is getting a compile error when this header is included from C++ code:
include/xxhash.h:233:61: error: expected ',' or '...' before 'dst_state'
include/xxhash.h:234:61: error: expected ',' or '...' before 'dst_state'
C++ does not have standard support for restrict, but many compilers have equivalents that usually work in both C++ and C, such as the GNU Compiler Collection's and Clang's restrict, and Visual C++'s __restrict and __declspec(restrict).
I'll try fixing it tomorrow, but I'll probably do something like:
I think defining an xxhash-specific macro like XXH_RESTRICT is less intrusive than potentially defining restrict which might affect how system headers, etc, are interpreted.
The text was updated successfully, but these errors were encountered:
in xxhash.h:
restrict
is technically only a keyword in C, not C++ yet this header needs to be includible from either. Most C++ compilers I guess either accept it as an extension or doesn't set__STDC_VERSION__
incorrectly. However, one host in my build farm (a Solaris x86_64 machine with gcc 4.7.3) is getting a compile error when this header is included from C++ code:According to wikipedia https://en.wikipedia.org/wiki/Restrict
I'll try fixing it tomorrow, but I'll probably do something like:
I think defining an xxhash-specific macro like
XXH_RESTRICT
is less intrusive than potentially definingrestrict
which might affect how system headers, etc, are interpreted.The text was updated successfully, but these errors were encountered: