FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix #391 (`__TIME__` replacement might be empty depending on compiler) by glankk · Pull Request #441 · cppcheck-opensource/simplecpp · GitHub

Fix #391 (__TIME__ replacement might be empty depending on compiler) - #441

Merged
firewave merged 1 commit into
cppcheck-opensource:masterfrom
glankk:strftime_remove_T_specifier
Aug 4, 2025
Merged

Fix #391 (__TIME__ replacement might be empty depending on compiler)#441
firewave merged 1 commit into
cppcheck-opensource:masterfrom
glankk:strftime_remove_T_specifier

Conversation

glankk commented Jun 12, 2025

Copy link
Copy Markdown
Collaborator

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.

danmar commented Jun 12, 2025

Copy link
Copy Markdown
Collaborator

please create an issue.
if a test can be added that would be great.
I guess you could install mingw-w64 with this: https://github.com/marketplace/actions/install-mingw

Copy link
Copy Markdown
Collaborator

We need a test that actually triggers the issue first. I will add MinGW workflow to the CI.

glankk changed the title Workaround for mingw-w64 strftime issue Fix #391 (__TIME__ replacement might be empty depending on compiler) Jun 12, 2025

firewave commented Aug 4, 2025

Copy link
Copy Markdown
Collaborator

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.

firewave commented Aug 4, 2025

Copy link
Copy Markdown
Collaborator

Actually #475 confirmed that this fails and requires this change to succeed. So merging it.

firewave merged commit 435a74c into cppcheck-opensource:master Aug 4, 2025
glankk deleted the strftime_remove_T_specifier branch August 14, 2025 08:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL