i#7493 GCC-15: Specify language dialect when checking type existence#7494
Open
ziyao233 wants to merge 1 commit intoDynamoRIO:masterfrom
Open
i#7493 GCC-15: Specify language dialect when checking type existence#7494ziyao233 wants to merge 1 commit intoDynamoRIO:masterfrom
ziyao233 wants to merge 1 commit intoDynamoRIO:masterfrom
Conversation
Existence of types may vary between language versions. For example, bool is turned into a builtin type in C23, but is defined in stdbool.h only in pre-C23 specifications. Let's specify the C dialet used by our main codebase, GNU C99, explicitly when checking for existence of types, to keep probed results aligned with configuration used for building. Issue: DynamoRIO#7493
| @@ -797,6 +797,8 @@ if (UNIX) # unlikely to be an issue on Windows | |||
| # and set DR_DO_NOT_DEFINE_* | |||
Contributor
There was a problem hiding this comment.
Let's specify the C dialet used by our main codebase, GNU C99, explicitly when checking for existence of types, to keep
spelling: dialect
| # Note that for later gcc uint and ushort seem to be "soft typedefs": | ||
| # defined, but overridable: ?!? | ||
| set(CMAKE_ORIG_C_FLAGS "${CMAKE_C_FLAGS}") | ||
| set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99") |
Contributor
There was a problem hiding this comment.
If the issue is that gnu99 is not passed everywhere, shouldn't we solve that? Adding this temporary gnu99 just for these checks does not seem the best approach. There is also no comment here explaining why we'd set a flag and then unset it so this going to be confusing to future readers without explanation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Existence of types may vary between language versions. For example, bool is turned into a builtin type in C23, but is defined in stdbool.h only in pre-C23 specifications.
Let's specify the C dialect used by our main codebase, GNU C99, explicitly when checking for existence of types, to keep probed results aligned with configuration used for building.
Issue: #7493