A versatile and stereocontrolled route to pyranose and furanose C-glycosides.