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

Remove integer digit separator from preprocessor macro. Fix build with Clang #109

Closed
wants to merge 1 commit into from

Conversation

Delta-dev-99
Copy link
Contributor

@Delta-dev-99 Delta-dev-99 commented Apr 13, 2024

This pull request solves this issue

This commit reverts the definition of SCN_COMPILER in pp_detect.h to what it was before commit 1c3280e
Direct link to file change reverted: include/scn/detail/pp_detect.h

The usage of the single-quote character as integer digit separator in preprocessor, results in build errors with Clang. (tested with clang versions 17,18 and 19). This probably happens because the preprocessor doesn't interpret the definition as an integer.
The error is generated by the dependency scanner.

Another proposal:

Instead of reverting, another option to increase readability would be to use binary power, instead of base 10, for the version number, although the result would be different.
Example:
( ((major) << 32) + ((minor) << 16) + (patch) )

The usage of the integer thousands separator ' in preprocessor integrals results in build errors with Clang. (tested with clang versions 17,18 and 19).
@eliaskosunen
Copy link
Owner

This is extremely silly. Merged in 7da4041 with clang-format applied, thank you!

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.

2 participants