Skip to content
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

__TIME__ replacement might be empty depending on compiler #391

Open
firewave opened this issue Nov 22, 2024 · 1 comment
Open

__TIME__ replacement might be empty depending on compiler #391

firewave opened this issue Nov 22, 2024 · 1 comment
Assignees

Comments

@firewave
Copy link
Collaborator

The %T format specifier we are using to generate the timestamp is not supported by all compilers:

/home/runner/work/simplecpp/simplecpp/simplecpp.cpp: In function ‘std::string getTimeDefine(const tm*)’:
/home/runner/work/simplecpp/simplecpp/simplecpp.cpp:3291:34: error: ISO C++98 does not support the ‘%T’ gnu_strftime format [-Werror=format=]
 3291 |     strftime(buf, sizeof(buf), "%T", timep);
      |                                  ^
@firewave firewave self-assigned this Nov 22, 2024
@firewave
Copy link
Collaborator Author

It would be sufficient to have the placeholder (already used in code) in case it is not supported.

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

No branches or pull requests

1 participant