As was mentioned, a GFCI does not need a safety ground to operate, since it detects and trips off of a current imbalance (on the theory that any current not returning via the neutral line is faulting to ground somehow).
A GFCI is one way of installing a three prong outlet on a circuit in an old building that lacks safety ground wiring while still meeting code requirements. One does need to label things specially...but putting on a sticker or placard is often far simpler than running a safety ground wire.