First the snide remark: So you'd want to be able to compile some of your program in Sun's Java, some in J Builder, and some in Visual J++, and have them all work together? Yeah, right.
Yes, actually, I've done exactly that with no issues whatsoever. The Java code we have here compiles flawlessly across all three platforms. I've never had issues porting Java code.

My porting problem is that
  1. portions of the code may or may not be nonstandard. cf, for the THIRD or FOURTH time, this is not my code. I don't care if you are lucky enough to be able to control your code 100%; I don't have that luxury. I've believe I've made that point several times.
  2. the compilers may or may not compile the same code whether it is standard or not.
  3. Even when the compilers DO compile the code, it isn't always compiled correctly. gcc 3.2.1 forgets about #defines. gcc 2.95.2 has broken exception handling when throwing exceptions in shared libs. MSVC has a broken STL implementation. Now I'm trying another C++ compiler, Intel's. See other thread for new issues arising from that.
The list goes on and on. Standards will technically give compatibility; in the real world that seems not to be the case.

All of this is beside the inherent stupidities of the C++ language itself.