nemequ / hedley

A C/C++ header to help move #ifdefs out of your code
https://nemequ.github.io/hedley/
Creative Commons Zero v1.0 Universal
774 stars 51 forks source link

_Static_assert on gcc < 6 #59

Open adeason opened 1 year ago

adeason commented 1 year ago

Commit a4194fd3ee6a22e447414dd66c044bd01715b10f changed HEDLEY_STATIC_ASSERT to require gcc >= 6 to use _Static_assert, but it seems to work fine as far back as at least gcc 4.6.4, as far as I can tell. I'm just wondering if there is some issue with gcc pre-6 that I'm not immediately seeing? It works even with -std=c89. I do see a warning with -pedantic, but that also happens with gcc 6.

https://godbolt.org/z/6q5j856na

https://godbolt.org/z/nKaP41WeP