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

improved prerequisite checks for __has_include handling #286

Merged
merged 3 commits into from
Apr 26, 2024

Conversation

firewave
Copy link
Collaborator

@firewave firewave commented Jan 3, 2023

The check in simplecpp::preprocess obviously didn't work if gnu++ or another alias were used. Also the simplification should only be performed if supported.

This does not fix the hang tracked in https://trac.cppcheck.net/ticket/11456. The code there is unfortunately a file which is over 1.5 MB big so we need to find a smaller sample.

@firewave firewave changed the title improve prerequisites checks for __has_include handling improve prerequisite checks for __has_include handling Jan 3, 2023
@firewave firewave changed the title improve prerequisite checks for __has_include handling improved prerequisite checks for __has_include handling Jan 3, 2023
@firewave
Copy link
Collaborator Author

firewave commented Jan 3, 2023

Given that we have no default standard set and we don't check the standard in any other place the check in simplecpp::preprocess() should probably be removed (as well as the check I additionally added) so we always assume the highest possible standard in all cases.

Or we should assume the highest possible on if it is not specified. That would probably be better.

@firewave firewave marked this pull request as ready for review April 26, 2024 09:36
@firewave
Copy link
Collaborator Author

This should be fine to merge. I will address the case of default to the latest standard if none is provided in a different PR and also file a ticket about it.

@danmar danmar merged commit e040047 into danmar:master Apr 26, 2024
14 checks passed
@firewave firewave deleted the cpp17 branch April 26, 2024 17:04
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