Pekka Enberg
unread,Oct 25, 2013, 4:54:39 AM10/25/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Osv Dev
Hello,
It seems like clang doesn't really care much for "-Wno-pointer-arith"
for C++11 code:
[penberg@localhost tmp]$ cat pointer-arith.cpp
#include <cstdio>
int main()
{
void *p = reinterpret_cast<void*>(0xdeadbeef);
printf("%p\n", p + 8);
}
[penberg@localhost tmp]$ g++ -std=gnu++11 -Wall -Wno-pointer-arith
pointer-arith.cpp
[penberg@localhost tmp]$ clang++ -std=gnu++11 -Wall -Wno-pointer-arith
pointer-arith.cpp
pointer-arith.cpp:7:22: error: arithmetic on a pointer to void
printf("%p\n", p + 8);
~ ^
1 error generated.
For C code, the option works as expected.
What do we want to do in OSv code? Follow the more pedantic style
enforced by Clang or file a bug report and hope for the best?
Pekka