Gnu G++ 2.3.3, 2.5.8: These mostly work. You must enable the options TEMPS_DESTROYED_QUICKLY and TEMPS_DESTROYED_QUICKLY_R. You can't use expressions like Matrix(X*Y) in the middle of an expression and (Matrix)(X*Y) is unreliable. If you write a function returning a matrix, you MUST use the ReturnMatrix method described in this documentation. This is because g++ destroys temporaries occuring in an expression too soon for the two stage way of evaluating expressions that newmat uses. Gnu seems to leave some rubbish on the stack. Possibly this is a printer buffer so it may not be a bug. You will have problems with versions of Gnu earlier than 2.3.1.
Linux: Gnu G++ 2.5.8 seems a little more touchy than regular G++. But basically the package works.
Gnu G++ 2.6.0: Seems OK. There should be better compatibility because version 2.6 retains temporaries until the end of the statement instead of destroying them immediately following the first access. I suggest you enable option TEMPS_DESTROYED_QUICKLY but not TEMPS_DESTROYED_QUICKLY_R.