Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

glankk
Copy link
Contributor

@glankk glankk commented Jun 12, 2025

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
Copy link
Owner

danmar commented Jun 12, 2025

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

@firewave
Copy link
Collaborator

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

@glankk glankk changed the title Workaround for mingw-w64 strftime issue Fix #391 (__TIME__ replacement might be empty depending on compiler) Jun 12, 2025
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