Chris Lattner
2013-Feb-04 04:57 UTC
[LLVMdev] A bug in LLVM-GCC 4.2 with inlining __exchange_and_add
On Feb 3, 2013, at 11:28 AM, Jack Howarth <howarth at bromo.med.uc.edu> wrote:> On Sun, Feb 03, 2013 at 10:32:35AM -0800, Chris Lattner wrote: >> >> On Feb 3, 2013, at 2:32 AM, Anton Korobeynikov <anton at korobeynikov.info> wrote: >> >>>> I've encountered this issue in a real code and would be glad to get the >>>> feedback on it. Please let me know if I need to submit a bug somewhere to get it resolved. I've found out that clang does not have this problem. >>> Then use clang. llvm-gcc is deprecated. >> >> I'd go farther: llvm-gcc is quite dead now. > > Chris, > 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. -Chris
Dimitry Andric
2013-Feb-04 09:20 UTC
[LLVMdev] A bug in LLVM-GCC 4.2 with inlining __exchange_and_add
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
Chris Lattner
2013-Feb-04 18:56 UTC
[LLVMdev] A bug in LLVM-GCC 4.2 with inlining __exchange_and_add
On Feb 4, 2013, at 1:20 AM, Dimitry Andric <dimitry at andric.com> wrote:> 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.Again, the right mailing list to discuss this is cfe-dev. Please start a thread there, thanks! -Chris