Open SteveLee123 opened 6 months ago
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.
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. but pointer is 4bytes at 32bit system and 8bytes at 64bit system.
seems that is not about headers.
NO. see https://en.cppreference.com/w/cpp/types/integer
uintptr_t(optional) | unsigned integer type capable of holding a pointer to void(typedef)
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.
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 --
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.
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.
so you still think is because the headers ? how can I make sure I got the right header by auto-detection?
my header directory search way is like this: https://github.com/qqiangwu/cppsafe/issues/42#issuecomment-2003065472
fix by: cppsafe -p xxxx a.cpp --extra-arg=-m32
because cppsafe cannot detect my cpu.
Can you show me your compile_commands.json?
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; Secondly, I upgrate my gcc to 11.4.0, and compile cppsafe . Lastly, I use cppsafe -p compile_commands.json xxx.cpp.
Are these error all about I use a wrong version of gcc in my compile_commands.json?
And I need to downgrade my gcc to 7.3.0?
Is it right ?
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.