C++ Logo

std-proposals

Advanced search

Re: New attribute for experimental features

From: connor horman <chorman64_at_[hidden]>
Date: Fri, 12 Mar 2021 08:15:16 -0500
I would say the same thing. By generalizing from "experimental feature
diagnostic" to "custom diagnostic" you've also increased the scope of the
diagnostic, which prevents fine-grained control of these custom
diagnostics. With simply [[diagnostic]] programmers would have the option
to disable none or all. With a set of specialized diagnostic attributes
(deprecated, experimental, etc.) then programmers can pick and choose what
diagnostics to ignore, what diagnostics to promote to errors, and which to
leave.

On Fri, Mar 12, 2021 at 08:05 Matthew Woehlke via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> On 11/03/2021 17.55, codusnocturnus via Std-Proposals wrote:
> > On Thu, Mar 11, 2021 at 3:14 PM, Carlos ORyan wrote:
> >> I would like to propose an attribute [[experimental(msg)]], with
> >> similar semantics to [[deprecated(msg)]].
> >
> > Why not just a generic compiler diagnostic message mechanism?
> >
> > [[diagnostic(level, msg)]]
> > Where level in { info, warn, error }
> >
> > Relieve the compiler of the need to care about the reason.
>
> ...because from [[experimental(msg)]] naturally follows
> -W[no-]experimental. There would be no way to control a diagnostic such
> as you propose, except perhaps with a very blunt instrument.
>
> --
> Matthew
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>

Received on 2021-03-12 07:15:30