Backport fix for spurious anonymous ns warnings PR29365 to 4.2?

Aaron W. LaFramboise aaronavay62@aaronwl.com
Tue May 1 21:20:00 GMT 2007


I discovered PR29365 today while testing 4.2.0 RC2 on a client's 
codebase.  This causes some of my code, based on the popular pimpl 
idiom, to generate warnings, even with no warning flags specified.  If 
there's a way to turn it off without patching the source, I can't find it.

Given the pervasiveness of the pimpl idiom in C++, and the increasing 
use of anonymous namespaces in modern code, it is possible that this 
will be a serious problem for some C++ developers, that may hinder the 
adoption of 4.2.  It's not hard to imagine that this could come up in a 
lot of other weird places that uses anonymous namespaces, too.

Does this qualify as a regression?  Does anyone else think this is a 
serious problem?



More information about the Gcc mailing list