Nothing invalid about any of them. Assert is a macro, not a function with a prototype. The first and third asserts are potentially dangerous (they won't necessarily do what you think because of normal macro expansion rules), but nothing invalid at compile time. What is it really (in English) that you are trying to do? Dave -----Original Message----- From: gcc-help-owner@xxxxxxxxxxx [mailto:gcc-help-owner@xxxxxxxxxxx] On Behalf Of bill Sent: Tuesday, November 15, 2005 12:19 PM To: gcc-help@xxxxxxxxxxx Subject: assertion warnings Is there any way to get gcc to generate warnings for the following code? -Wall gives no complaints at all. I expect that it's asking too much to get a warning for the first assertion, but the other two seem to be pretty obvious candidates for a warning. #include <assert.h> int foo(int *x) { *x = *x+1; return *x; } int main() { int x; assert(foo(&x)); assert(x=2); assert(x++); return 0; }