GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix #391 (`__TIME__` replacement might be empty depending on compiler) by glankk · Pull Request #441 · cppcheck-opensource/simplecpp

Conversation

@glankk

@glankk 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@glankk
Change %T specifier to %H:%M:%S
cf41113
@danmar

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@firewave

firewave commented Jun 12, 2025

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@firewave

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@firewave
firewave merged commit 435a74c into cppcheck-opensource:master Aug 4, 2025
@glankk
glankk deleted the strftime_remove_T_specifier branch August 14, 2025 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@glankk @danmar @firewave
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.