[cfe-dev] Clang-cl.exe and the VC++ preprocessor
Daniel James
daniel at calamity.org.uk
Fri Jul 11 12:57:42 PDT 2014
On 11 July 2014 19:16, Reid Kleckner <rnk at google.com> wrote:
> On Fri, Jul 11, 2014 at 10:52 AM, Daniel James <daniel at calamity.org.uk>
> wrote:
>>
>> On 11 July 2014 18:12, Richard Smith <richard at metafoo.co.uk> wrote:
>> >
>> > I'm not sure what that list of compilers is for (if _MSC_VER is defined,
>> > why
>> > don't you assume the compiler acts like MSC?), but removing "|| defined
>> > __clang__" from the list should fix the issue.
I just tried and it doesn't seem to. I think emulation would have to
be really close to use the Visual C++ code, it's quite sensitive to
things like expansion order. The error message suggests using
'-fmacro-backtrace-limit=0' to see the full output, anyone know if
there's a way to do that with clang-cl? Or the flags to use from
normal clang?
>> Then it would stop working with older version of clang.
>
> I maintain there is no old version of Clang that defines _MSC_VER that is
> worth supporting with ifdefs in Boost. We haven't done a release with
> stable MSVC ABI support yet.
I don't think the check was added for no reason, presumably someone
cared. We're also going to have the same problem if further emulation
is added in later versions.
> Also, nobody has pinpointed if and when our preprocessor behavior changed.
> It's possible that it happened over a year ago, before 3.4.
Sorry, I got the impression from this thread that this is only in the
latest build. I just downloaded the windows binary for 3.4.1 and it
happens with that version.
More information about the cfe-dev
mailing list