[cfe-dev] [RFC] A proposal for #pragma optnone

Renato Golin renato.golin at linaro.org
Mon Apr 28 13:46:00 PDT 2014


On 28 April 2014 18:54, Philip Reames <listmail at philipreames.com> wrote:
> Adding support for this usage does not have to imply an endorsement of the
> style.  In fact, our documentation could explicitly suggest migration to
> per-function attributes.  (In my view, it should.)

I agree. Strongly against the use of virtually any pragmas, but still
support for legacy code. Implementation wise, if possible make it an
alias to existing (or future-proof) similar features, but trying to
get as close as possible to the "original" semantics (by copying the
compilers that do implement to a reasonable distance). However, any
such change should be very isolated, easy to remove and not introduce
incompatible or irreparable changes to the code base or the language
reference.

AFAICS, all pragmas should be transformed into function attributes,
annotation, metadata, etc. This way, the problem stays isolated in the
front-end.

But this is *not* an encouragement to use, just a migration path. This
is why I'm against *creating* a new pragma.

cheers,
--renato



More information about the cfe-dev mailing list