Fix #391 (`__TIME__` replacement might be empty depending on compiler) by glankk · Pull Request #441 · cppcheck-opensource/simplecpp
Conversation
The %T format specifier for strftime is somehow still not implemented in mingw-w64, causing simplecpp to expand __TIME__ to an empty string. This is an issue with the compiler suite, but the easiest fix is to use the equivalent %H:%M:%S instead. C99's %T is defined to be equivalent to %H:%M:%S, so this change should be compatible with all implementations supporting strftime.
glankk
changed the title
Workaround for mingw-w64 strftime issue
Fix #391 (__TIME__ replacement might be empty depending on compiler)
I started working on the MinGW CI in #475 (sorry it took so long) but that also exposed a number of different issues which should be looked at first.
Actually #475 confirmed that this fails and requires this change to succeed. So merging it.
glankk
deleted the
strftime_remove_T_specifier
branch