https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122442

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |87403
           Severity|normal                      |enhancement

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Avi Kivity from comment #0)
> Possible syntax: -Werror=deprecated-declarations-namespace-n1-n2 to error
> for deprecated symbols from namespace n1::n2.

The variable part should be a comma-separated list after equals, otherwise with
hyphens it's not clear where the option ends and the variable list begins, so:

-Wdeprecated-declarations-namespace=n1,n2


But for consistency with the -Wno-attributes option, maybe the namespace should
use the form n1:: not just n1, and that might suggest we don't need to say
"-namespace" at all.

i.e. we have -Wno-attributes and -Wno-attributes=ns::

We could have -Wdeprecated-declarations and -Wdeprecated-declarations=ns::

That would automatically imply -Wno-deprecated-declaration=ns:: to disable
warnings about declarations in that namespace (e.g. in the implementation file
that provides definitions for those deprecated declarations) and
-Werror=deprecated-declarations=ns:: to make it an error for declarations in
that namespace.

For more than one namespace, just repeat the option:

-Wdeprecated-declarations=n2:: -Wdeprecated-declarations=n1::


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87403
[Bug 87403] [Meta-bug] Issues that suggest a new warning

Reply via email to