It works with a recent version of gcc but not with apple gcc 4.2.