------- Comment #10 from spark at gcc dot gnu dot org  2007-04-04 00:18 -------
(In reply to comment #9)
> (In reply to comment #8)
> > The following patch addresses the problem.
> > Do we want to add a flag to control this ?
> 
> Except if you look at the file name, you could get a case where you are no
> longer warning about.

That's why I asked if we want to add a flag to enable/disable this 
- although I think my patch is a reasonable compromise as a default,
it's not perfect (it can never be perfect unless we do whole-program analysis).

The patch prevents the warning IF the anonymous namespace
was in the same main source file that it's currently compiling (e.g. *.cc
file).
I think this covers bulk of the false positives with very small number of the
false negatives. 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29365

Reply via email to