The following code prompts a warning on the line f(n - 1), but not on the line f(n - n). I guess this is because n - n is being turned into zero too early. (Definition of null pointer constant says it must be a constant expression; n - n is not one.)
void g(int n) { void f(int *); f(n - 1); f(n - n); } -- Summary: too many expressions recognised as null pointer constants? Product: gcc Version: 4.3.3 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: michael dot norrish at gmail dot com GCC host triplet: i486-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42005