[cfe-dev] Language not recognized: 'c++-module-cpp-output'
Boris Kolpackov via cfe-dev
cfe-dev at lists.llvm.org
Mon Jun 5 08:45:40 PDT 2017
Boris Kolpackov <boris at codesynthesis.com> writes:
> David Blaikie <dblaikie at gmail.com> writes:
>
> > I don't think it can, but maybe - the issue being that the contents of the
> > assert expression mustn't be evaluated or even parsed, etc, if assertions
> > are not enabled.
>
> I don't think it will affect a lot of code if it is parsed and discarded
> when disabled. One will have to do things differently based on NDEBUG to
> craft something like this. Which will then disqualify it from this "already
> preprocessed" mode.
>
> In fact, I would very much like to have a version of assert() that always
> evaluates the condition.
It was pointed to me off-list that there is a proposal[1] that would
provide the assert attribute as an alternative to the assert() macro:
[[assert: foo != 0 && bar == 0]];
[1] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0542r0.html
Boris
More information about the cfe-dev
mailing list