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

Convert integer<->pointer conversions to errors #1165

Merged
merged 1 commit into from
Nov 13, 2021
Merged

Conversation

gnuoyd
Copy link
Contributor

@gnuoyd gnuoyd commented Nov 4, 2021

Make it an error if the library implicitly converts from integer to pointer or from pointer to integer (-Werror=int-conversion). Also, make it an error if the library explicitly converts to pointer from an integer of a different size (-Werror=int-to-pointer-cast).

pointer or from pointer to integer (-Werror=int-conversion).  Also,
make it an error if the library explicitly converts to pointer from an
integer of a different size (-Werror=int-to-pointer-cast).
Copy link
Contributor

@byrnHDF byrnHDF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the compilers?

@gnuoyd
Copy link
Contributor Author

gnuoyd commented Nov 4, 2021

What about the compilers?

What do you mean?

@byrnHDF
Copy link
Contributor

byrnHDF commented Nov 4, 2021

What about the compilers?

What do you mean?

clang, intel error files?

@derobins
Copy link
Member

This is fine but we should probably try to extrapolate this to clang, which probably has similar warnings.

@lrknox lrknox merged commit 08b1c6a into develop Nov 13, 2021
@gnuoyd gnuoyd deleted the feature/ptr-conv-err branch March 11, 2022 17:07
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.

4 participants