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.34k stars 73 forks source link

Use __attribute__((unused)) for clang too #73

Closed sgraham closed 1 year ago

sgraham commented 1 year ago

Otherwise, results in warnings like

.../STC/include\stx/../stc/cvec.h(280,1): warning: unused function 'vec_int_drop' [-Wunused-function]

At least for clang on Windows, __clang__ is defined, but __GNUC__ is not (as confirmed by clang -E -dm -x c nul).

tylov commented 1 year ago

Hi, thanks. I use the mingw distrubution on winlibs.com, where clang defines GNUC, so I assumed that was always the case.