stb_ds: build error with gcc -std=c99 up to c18 (works fine with gnu99 and c2x variants) #1734
Unanswered
sroccaserra
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Yes, that is the correct substitution, but I don't know enough about it to know if that's the right predefined macro to test. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, thank you for stb_ds.
I have trouble building with gcc without gnu standards when using
hmput()
andhmget()
, did I miss to set some configuration?Problem
It works fine with
-std=gnu99
, up tognu18
, but I get the following error with-std=c99
, up toc18
:Note: it works without error with
-std=c2x
with gcc 13, and-std=c23
with gcc 14 (tested with gcc 14.2.0).Code
I use:
The code of
test_stb_ds.c
is from the documentation:Ideas / what I tried
I noted that I have no issue with clang with c99+ standards, so I tried this diff and it seems to work:
Beta Was this translation helpful? Give feedback.
All reactions