
14 Mar
2010
14 Mar
'10
5:10 p.m.
Mateusz Loskot wrote: [snip]
I forgotten about -Wextra option and now GCC 4.4.1 reports the same worning, indeed. I was wrong, the assert macro is not that clever as I suggested
$ g++ -E -pedantic -Wall -Wextra -DNDEBUG test.cpp int main() { int* p = 0; (static_cast<void> (0)); // assert macro }
$ g++ -pedantic -Wall -Wextra -DNDEBUG test.cpp test.cpp: In function ‘int main()’: test.cpp:4: warning: unused variable ‘p’
Best regards,
So what do you think of my re-definition?