<xxhash.h> includes system headers inside extern "C" block #1122

Closed
opened 2026-08-05 09:07:37 -05:00 by andreas-schwab · 2 comments
andreas-schwab commented 2026-08-05 09:07:37 -05:00 (Migrated from github.com)

Including system headers inside a linkage spec is a no-no. It has caused
this error:

/usr/lib64/gcc/aarch64-suse-linux/17/include/arm_neon.h:5286:1: error:
conflicting declaration of ‘int64_t vaddd_s64(int64_t, int64_t)’ with ‘C’
linkage
5286 | vaddd_s64 (int64_t __a, int64_t __b)
| ^~~~~~~~~
/usr/lib64/gcc/aarch64-suse-linux/17/include/arm_neon.h:37:21: note: previous
declaration with ‘C++’ linkage
37 | #pragma GCC aarch64 "arm_neon.h"
| ^~~~~~~~~~~~

Including system headers inside a linkage spec is a no-no. It has caused this error: /usr/lib64/gcc/aarch64-suse-linux/17/include/arm_neon.h:5286:1: error: conflicting declaration of ‘int64_t vaddd_s64(int64_t, int64_t)’ with ‘C’ linkage 5286 | vaddd_s64 (int64_t __a, int64_t __b) | ^~~~~~~~~ /usr/lib64/gcc/aarch64-suse-linux/17/include/arm_neon.h:37:21: note: previous declaration with ‘C++’ linkage 37 | #pragma GCC aarch64 "arm_neon.h" | ^~~~~~~~~~~~
reneleonhardt commented 2026-09-02 06:54:47 -05:00 (Migrated from github.com)

Is this a duplicate of #960? Does #1125 fix both issues, and followed the discussion in 960?

Is this a duplicate of #960? Does #1125 fix both issues, and followed the discussion in 960?
Cyan4973 commented 2026-09-14 17:44:28 -05:00 (Migrated from github.com)

Fixed in #1129

Fixed in #1129
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-Cyan4973/xxHash#1122
No description provided.