1 /* Copyright (C) 2008-2010 Nick Bowler
3 * License WTFPL2: Do What The Fuck You Want To Public License, version 2.
4 * This is free software: you are free to do what the fuck you want to.
5 * There is NO WARRANTY, to the extent permitted by law.
7 * This is, to the best of my knowledge, a strictly conforming ANSI C
8 * (C89) program which is not a C++ program. This proves by counter-
9 * example that C++ is not a superset of C.
11 * Some of the "techniques" used in this file are stupid legacy features.
12 * Please don't take this as an example of a well-written C program.
14 * The output of this program should be:
15 * The old answer was 42, but the new answer is 54.
17 * There are more than 10 different things wrong with this program if you
18 * consider it as C++. Can you spot them all? This is not valid C99 for
19 * a few of these reasons. For now, it is pointless to update this to
20 * C99 -- there are just too many obvious incompatibilities.
47 struct foo foo = { 0 };
50 if (argc >= foo.val) {
51 return main(bar(), argv);
60 new = malloc(sizeof 'x');
67 printf("The old answer was %d, but the new answer is %d.\n",
77 return (enum{X = ANSWER3})-X//**/-1