GFCI are commonly used on mobile and portable generators and when powering Cord & Plug connected loads there is no requirement to ground them. In that use the neutral must be bonded to the frame of the generator as required by the US National Electrical Code (NEC) And the regulations promulgated under the Occupational Safety and Health Act for work place safety. In such use the GFCI will still sense the imbalance of current from the normally current carrying conductors and open the circuit just as quickly as it would on a grounded system.
don_resqcapt19 is correct about GFCIs used on unbonded generators and that introduces a special hazard.
A fault in an unbonded generator, or one of it's cord and plug connected loads, would energize the frame of the generator at an unknown voltage to ground but if the connected load or the generator were to become grounded by accident then it would still be energized and contact to it and the earth at the same time could cause the person in contact with it to complete the circuit. The most dangerous example of that which I have seen was that a metal stand worksite flood light which was standing in mud on reinforced concrete. The generator was hundreds of feet away from the faulted stand light. The voltage drop through the very long extension cord and portable outlet panel was enough to get the fella that went to shut it down at the end of the swing shift a serious shock. The fire station and the ambulance's Automated External Defibrillator were only a half mile away and reached him quickly in spite of the backed up traffic by running the opposing traffic side of the road to avoid going to the next exit and getting through the backed up traffic. The contractor was charged a very large fine because they had no insured equipment grounding conductor continuity program in place which would have detected the open bonding jumper at the generator.
Tom Horne