g++ 4.2.8 vs libc++ - bug?

Hi,

I hope I found the right place for this question. I was trying something very basic, i.e. to read a double followed by a character, from cin, and noticed that there is a difference between the way this works using g++ 4.2.8 on linux and the way it does (not work) using libc++ on a mac with the latest version of xcode.

The entire code has only a few lines:

This is due to differences in how libstdc++ and libc++ view reading
floating-point numbers from an input stream. You can read a long,
slightly Firefox-specific explanation here:

https://hg.mozilla.org/mozilla-central/raw-rev/edd76ca3717f

-Nathan