-
Notifications
You must be signed in to change notification settings - Fork 1
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
error: cast from pointer to smaller type #52
Comments
still, it's the problem of headers. uintptr_t are the same length of pointers by design. Please provide the concrete os versions and how to re-produce it, otherwise I cannot handle it. |
I got them from google: 'uintptr_t' (aka 'unsigned int') is alwasys 4bytes. seems that is not about headers. |
NO. see https://en.cppreference.com/w/cpp/types/integer
|
I somehow knowns the problem, but I need an environment to reproduce it. Please wait. A potential solution is to not rely on auto-detection, specify includes by your self. For example: cppsafe a.cpp -- -isystem/usr/include -isystem/usr/local/include Remember to replace these -isystem to your local c/c++ includes. |
seems that I can't use compile_commands.json if I use -- |
Can you show me your compile_commands.json? |
I will show you part of it tomorrow. |
so you still think is because the headers ? my header directory search way is like this: #42 (comment) |
fix by: because cppsafe cannot detect my cpu. |
I somehow know the reason of why I got so many headers error. Firstly, I compile my project with gcc7.3.0, so My compile_commands.json is generated by gcc 7.3.0; Are these error all about I use a wrong version of gcc in my compile_commands.json? Thanks for helping. |
I use x86_64 gcc and I encounter this error. how can I fix that ?
seems that is because my pointer is 64bits.
The text was updated successfully, but these errors were encountered: