The following function does not compile with g++, it probably thinks that '(long' starts a C-style cast. Zoli long foo(long x) { return (long(short(x)) + 1); }