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

Robinson, Paul Paul_Robinson at playstation.sony.com
Tue Apr 29 15:49:58 PDT 2014


> From: Reid Kleckner [mailto:rnk at google.com] 
>
> On Tue, Apr 29, 2014 at 2:53 PM, Robinson, Paul <Paul_Robinson at playstation.sony.com> wrote:
> > > I would still try to spell it the same as GCCs if convenient:
> > > "#pragma clang optimize 0" or whatever.
> Um.  Spell it like GCC's but put it in the clang namespace so that
> it isn't spelled like GCC's?  <Tries to envision a rationale>
>
> So that way it looks kinda familiar to GCC users, but if there are
> any actual GCC directives in the source, we don't actually implement
> them, assuming they're there to avoid GCC miscompiles but clang isn't
> GCC and so won't have the same miscompile issues...  (Am I at all close?)
>
> OK, I'm convinced we actually don't want compatibility here.  I don't think
> the spelling is important.  Is should probably be in the '#pragma clang ...' 
> namespace though. 

Which cycles us back to the original proposal:

#pragma clang optnone [on|off]

...which is obviously tied to the attribute of the same name, which
seems like at least a small goodness.
--paulr





More information about the cfe-dev mailing list