Well, no: It won't *always* compile.
#include /* nowadays */
#include /* nowadays, sort of */
#include /* ... and the not-quite-compatible consequents thereof */
#include ... char *p = sprintf(...); /* worked in some old C's, not today */
enum permissiveness { allow, forbid, restrict };
enum roller_skate_type { side_by_side, inline };
processTransaction(tptr, void) Transaction *tptr; /* the transaction to process */ int void; /* flag: true to void the transaction */ { ... }
extern char *malloc(); ... float matrix = (float*) malloc(rows * cols * sizeof(float)); /* This one's moderately subtle, but potentially fatal because * although it may well compile, thus not providing a reliable * counter-example to your assertion, it can misbehave badly. */
unsigned short this = 42; int that = -42; int those = this * that; /* Another "It compiles" example, where "It compiles" is of * little comfort. Modern C gives -1764 as the result, while * some old C's gave 4294965532 or 63772. Again, a case where * "It compiles" simply isn't good enough: "It compiles," but * to something not intended by the author. */
Java's a lot cleaner than C in this respect (given its shorter history, it ought to be), but still not quite perfect. Consider a pre-1.4 source using `assert' as an identifier, or a pre-1.2 source with a method named `strictfp'. Change is the only constant.