   So what happens if...
  ... you #define the 'define' keyword?... you use a goto to jump into the middle of a for loop?... you post a challenge to come up with ways to abuse the compiler?   
  1&2: Nothing special happens.int main() {  #define define 6*9  #define cheese 42  #if define != 54  this shouldnt happen!!!.  #endif    goto foo;    for(;;)   {    foo:    break;   }    return 0; }3:// By smart_idiot. You probably won't be able to compile this// program for a few more decades.template <int d> class foo {  foo<d-1> bar, baz; };class foo<0> {  int bar; };int main() {  foo<500> goodbye_cruel_world; }There's a better copy of this somewhere.#include <iostream>#define C(v) cout<<(v?v==X?'X':'O':'.')using namespace std;enum P{N,X,O}p=O,b[9],c;int d[]={0,3,1,3,2,3,0,1,3,1,6,1,0,4,2,2},t,*u;int main(){for(;;){y:for(t=0;t<9;++t)t=N;for(;;){z:for(t=0;t<9;++t)C(t)<<((t+1)%3?' ':'\n');p=p==X?O:X;for(;;){C(p)<<", enter your move (1-9):  "<<flush;cin.sync();t=cin.get()-'1';t=t%3+3*(2-t/3);if(t>-1&&t<9&&!t)break;}t=p;for(u=d;u<d+16;u+=2)if((c=b[*u]))for(t=1;t<3;)if(c!=b[*u+t*u[1]])  break;else if(++t>2){C(c)<<" Wins!\n";goto y;}for(t=0;t<9;++t)if(!t)goto z;cout<<"Draw!  \n";goto y;}}};  Well, one thing about 2: if the for loop declares a loop variable, it won't compile (you can't goto forwards past an initialization statement).   ;Quote:Original post by SneftelWell, one thing about 2: if the for loop declares a loop variable, it won't compile (you can't goto forwards past an initialization statement).Why not just declare the control variable before the goto?   ;Quote:Original post by cowsarenotevilWhy not just declare the control variable before the goto?Normally because you want it in loop scope. But that's tangential.   ;  Well, this of course doesn't compile, but it (g++ at least) gives a fecking lot of error messages. (It's still spewing them out as I type this.)template<int X, int Y> struct foo {static const double bar;};template<int X, int Y> const double foo<X, Y>::bar = 0.2*foo<X+1, Y>::bar+0.5*foo<X, Y+1>::bar;#include <iostream>int main() {  std::cout << foo<0, 0>::bar << std::endl; }It's using all my CPU and several hundred megabytes of ram. I'm sure it's going to crash eventually.   ;  I don't know. But as an aside the programming language 'Scheme' allows you to redefine the arithmetic operators ('+' etc)   ;  Scheme also lets you redefine 'define' after which point you can define no more.   ;  could you redefine something else to do define, then redefine define?   ;  It turns out that this does not work in FreeBASIC:#define define 15+3But this does:#define #define 15+3And so does this: Warning: May stretch your browser#define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define  #define 15+3#define x 3And also this:#define boo #defineboo x 3Odd...   