forked from cil-project/cil
-
Notifications
You must be signed in to change notification settings - Fork 20
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
C99: Support for Complex Floats and tgmath.h #10
Merged
Merged
Conversation
This file contains 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
Is needed for support for tgmath.h
Add special treatment of __builtin_classify_type to Cabs, just like for example for __typeof__. Turn into CLASSIFYTYPE, and in cabs2cil.ml evaluate it to the appropriate int constant that GCC also uses. This is necessary to be able to determine the correct type of the conditional expressions used for tgmath.h. The correct type for an expression such as 0 ? (float *) 0 : (void*) (__builtin_classify_type(...) == X) depends on whether the last argument is a null pointer constant. `(void*) (__builtin_classify_type(...) == X)` is a nullptr constant iff `__builtin_classify_type(...) == X` is zero. To determine this it is neccessary to evaluate __bulitin_classify_type(...).
…" attribute And also check this in check.ml
gcc is an alias for clang by default, causing tests that rely on gcc specifics to fail
Was not ignored in GCC 7 (with warning), causes error in GCC 9
Build config validation warns: deprecated key sudo (The key `sudo` has no effect anymore.)
Instead of giving include path directly, hopefullt this fixes failing build for OCaml 4.08 on MacOS
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.
FComplexFloat, FComplexDouble, FComplexLongDouble
__imag__
and__real__
__builtin_classify_type
0 ? a : b
wherea
is a null pointer constant andb
is a pointer type)__builtin_tg_math
tgmath
expands to correctly. This requires 3. and 4. for GCC <8, and 5. for GCC >= 8gcc
is an alias forclang
in MacOS by default.See also #8 and #9