If it is hot poured ( oakum and lead joint) it does not need to be secured to the floor. In the Illinois code they say it only needs to be secured in these cases. Bold in the paragraph added by me.
Section 890.360 Water Closet and Pedestal Urinal
Fixture connections between drainage pipes and water closets, floor outlet service sinks and pedestal urinals, and earthenware trap standards shall be made by means of brass, copper, hard lead, plastic, or iron flanges; caulked, soldered, screwed or solvent welded to the drainage pipe. Flanges of hard lead, plastic and iron flanges for no-hub or compression joints shall be secured to the floor. The connection shall be bolted, with a gasket, washer or setting compound, between the earthenware and the flange. The floor flange shall be set on an approved firm base. The use of putty or non-drying plumber's putty manufactured specifically for plumbing installation is acceptable.