more g++ improvements that also keeps gcc happy