Re: [C++ Patch] PR 53184 ("Unnecessary anonymous namespace warnings")

2015-09-16 Thread Paolo Carlini
Hi, On 09/15/2015 03:11 AM, Jason Merrill wrote: On 09/14/2015 06:17 PM, Paolo Carlini wrote: Hi Florian, On 09/14/2015 09:41 PM, Florian Weimer wrote: This warning is +enabled by default. Maybe add a sentence why this is bad? I can only guess, but I suspect the reason is this: Such types

Re: [C++ Patch] PR 53184 ("Unnecessary anonymous namespace warnings")

2015-09-14 Thread Jason Merrill
On 09/14/2015 06:17 PM, Paolo Carlini wrote: Hi Florian, On 09/14/2015 09:41 PM, Florian Weimer wrote: This warning is +enabled by default. Maybe add a sentence why this is bad? I can only guess, but I suspect the reason is this: Such types are necessarily specific to a single translation un

Re: [C++ Patch] PR 53184 ("Unnecessary anonymous namespace warnings")

2015-09-14 Thread Paolo Carlini
Hi Florian, On 09/14/2015 09:41 PM, Florian Weimer wrote: This warning is +enabled by default. Maybe add a sentence why this is bad? I can only guess, but I suspect the reason is this: Such types are necessarily specific to a single translation unit because any definition in another translati

Re: [C++ Patch] PR 53184 ("Unnecessary anonymous namespace warnings")

2015-09-14 Thread Florian Weimer
On 09/09/2015 05:09 PM, Paolo Carlini wrote: > +@item -Wsubobject-linkage @r{(C++ and Objective-C++ only)} > +@opindex Wsubobject-linkage > +@opindex Wno-subobject-linkage > +Warn if a class type has a base or a field whose type uses the anonymous > +namespace or depends on a type with no linkage.

Re: [C++ Patch] PR 53184 ("Unnecessary anonymous namespace warnings")

2015-09-09 Thread Jason Merrill
OK, thanks. Jason

Re: [C++ Patch] PR 53184 ("Unnecessary anonymous namespace warnings")

2015-09-09 Thread Paolo Carlini
Hi, On 09/09/2015 03:00 PM, Jason Merrill wrote: On 08/24/2015 08:55 AM, Paolo Carlini wrote: +if (no_linkage_check (ftype, /*relaxed_p=*/false)) How about using the return value of no_linkage_check in the warning? Agreed, more informative. The below, which I'm finishing testing, also

Re: [C++ Patch] PR 53184 ("Unnecessary anonymous namespace warnings")

2015-09-09 Thread Jason Merrill
On 08/24/2015 08:55 AM, Paolo Carlini wrote: + if (no_linkage_check (ftype, /*relaxed_p=*/false)) How about using the return value of no_linkage_check in the warning? Jason

[Ping] [C++ Patch] PR 53184 ("Unnecessary anonymous namespace warnings")

2015-09-08 Thread Paolo Carlini
Hi, On 08/24/2015 02:55 PM, Paolo Carlini wrote: Hi, today I spent more time on this issue (which is getting duplicates). In fact it boils down to two separate issues: 1- Give a name to the warning, to make possible disabling it. 2- Don't talk about "anonymous namespace" when no anonymous nam

[C++ Patch] PR 53184 ("Unnecessary anonymous namespace warnings")

2015-08-24 Thread Paolo Carlini
Hi, today I spent more time on this issue (which is getting duplicates). In fact it boils down to two separate issues: 1- Give a name to the warning, to make possible disabling it. 2- Don't talk about "anonymous namespace" when no anonymous namespace is involved. Issue 1- should be rather st