I had the same compilation error on my Debian sid machine with Garnome
0.12.0. Using gcc-3.1 rather than gcc-2.95.4 made glib compile though.

how do you specify to use gcc-3.1 instead of gcc-2.95.4 (debian woody)

Unfortunately gcc is not covered with Debian alternatives system.
You have to go to /usr/bin an modify the gcc symlink to point to gcc-3.1
or whatever you have.
I switched to gcc-3.0 that I have installed and it did the trick.
R.