[LLVMdev] A bug in LLVM-GCC 4.2 with inlining __exchange_and_add

Dimitry Andric dimitry at andric.com
Mon Feb 4 01:20:21 PST 2013


On 2013-02-04 05:57, Chris Lattner wrote:
> On Feb 3, 2013, at 11:28 AM, Jack Howarth <howarth at bromo.med.uc.edu> wrote:
...
>>   At the risk of hijacking the thread, are there any plans to make -traditional-cpp
>> in clang completely emulate the behavior in llvm-gcc such that imake can be built
>> with it (https://bugs.freedesktop.org/show_bug.cgi?id=45509). This will be an issue
>> on darwin since llvm-gcc disappears after Xcode 4.6). Hopefully this can be resolved
>> before that happens.
>
> No plans that I'm aware of, but cfe-dev would be a better place to ask about that.  -traditional-cpp is emulating pre-ansi c preprocessor behavior which is *over* 20 years old by now.  It would be much better to work with the imake folks to fix their code.

I don't think there any 'upstream' to speak of anymore in case of imake.
Wikipedia even says "imake was a build automation system used by the X
Window System from X11R1 (1987) to X11R6.9 (2005)." :-)

That said, there is still quite a lot of old software requiring imake to
build, and most of that software falls over when it attempts to use
clang as a traditional preprocessor.  Mostly, because clang turns tabs
into spaces, confusing GNU make.  The FreeBSD ports guys now use either
gcc to preprocess such software, or use ucpp, a minimal traditional
preprocessor.

In any case, it is a bit strange clang actually accepts the -traditional
flag, instead of producing a fatal error.  PR 4557 talks about such an
error being implemented in r75690, but it seems to have been reverted
later on?  I think it would be better to just outright refuse the flag.

-Dimitry



More information about the llvm-dev mailing list