Issue |
136562
|
Summary |
compiler printf format warning doesn't really need to happen
|
Labels |
new issue
|
Assignees |
|
Reporter |
d3x0r
|
Compiled as C++...
``` c++
uintptr psvNew = 0;
printf( "Socket is not a server socket %p", psvNew );
```
``` log
warning: format ‘%p’ expects argument of type ‘void*’, but argument 2 has type ‘uintptr_t {aka long unsigned int}’ [-Wformat=]
printf( "Socket is not a server socket %p", psvNew );
```
This should never actually be an issue. [u]intptr is defined as a integer type large enough to hold a pointer. It should always take the same amount of space as a pointer, and a pointer can round-trip to and from the type without issue.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs