stclib / STC

A modern, user friendly, generic, type-safe and fast C99 container library: String, Vector, Sorted and Unordered Map and Set, Deque, Forward List, Smart Pointers, Bitset and Random numbers.
MIT License
1.35k stars 73 forks source link

Unable to build in TCC (c11 Atomic features?) #78

Closed rishavs closed 2 months ago

rishavs commented 10 months ago

Running the examples in TCC, throws this error;

...> tcc -Iincludes .\pixel.c -o pixel.exe; .\pixel.exe
In file included from ./pixel.c:2:
In file included from includes/stc/vec.h:65:
includes/stc/types.h:104: error: ';' expected (got "catomic_long")

My understanding is the atomics are not in c99 but in c11. Would it be correct to say that STC needs C11 instead of C99, or am i doing something wrong? From TCC maillists, it seems that TCC now supports all c99 features.

tylov commented 2 months ago

Sorry for not responding. STC is C99 still, so it's using old "atomics" API when it can (e.g. MSVC and GNU). TCC works with the newer versions from https://repo.or.cz/tinycc.git