[3.5 Release] Release Candidate 4 Now Available

We had to roll a release candidate 4 for the 3.5 release. It’s up at the normal place:

  http://llvm.org/pre-releases/3.5

Please test it and report any major bugs you may find.

Thanks!
-bw

Hi Chandler,

Can you make sure we have fixed your issue?

cheers,
--renato

Please see https://gist.github.com/cppljevans/73b4e2d357b801be822d
That gist contains a Makefile, a main program, and an .hpp file,
and outputs of 3 compilations
(in the "problem description and compiler outputs" file,
A.K.A the .out file, in the gist).

AFAICT, clang3.5rc3 does require an out-of-class definition when
the standard does not require one. The code example shows
1 case (using std::pair) where clang behaves as expected; however,
the 2nd case (using something like std::array) clang does *not*
behave as expected with no out-of-class definition.

The .out file in the gist provides more details about the code
run and the main file contains many References to the standard
and elsewhere justifying why I think this is a bug.

HTH.

-regards,
Larry

The stackoverflow entry here:

http://stackoverflow.com/questions/23428684/is-a-constexpr-array-necessarily-odr-used-when-subscripted

had an answer by Richard Smith indicating the array index expression
*was* an odr-use.

Sorry for noise, but as other people's comments on that
stackoverflow page indicate, odr-use is not easily understood :frowning:

Sorry for noise.

-regards,
Larry

I tried to use libcxxabi, as downloaded from:

http://llvm.org/pre-releases/3.5/rc4/libcxxabi-3.5.0rc4.src.tar.xz

However, on my system:

~/dwnlds/llvm/3.5/rc4 $ uname -a
Linux lje-OptiPlex-9020 3.13.0-35-generic #62-Ubuntu SMP Fri Aug 15
01:58:42 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

after doing cmake then make, getting some error about missing __sync_swap:

[ 11%] make[3]: Leaving directory
`/home/evansl/dwnlds/llvm/3.5/rc4/build-variants/Release/cmake-build'
Building C object
projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins-x86_64.dir/absvti2.c.o
make[3]: Entering directory
`/home/evansl/dwnlds/llvm/3.5/rc4/build-variants/Release/cmake-build'
/home/evansl/dwnlds/llvm/3.5/rc4/sources/llvm-3.5.0rc4.src/projects/libcxxabi/src/cxa_default_handlers.cpp:
In function ‘void (* std::set_unexpected(std::unexpected_handler))()’:
/home/evansl/dwnlds/llvm/3.5/rc4/sources/llvm-3.5.0rc4.src/projects/libcxxabi/src/cxa_default_handlers.cpp:106:52:
error: ‘__sync_swap’ was not declared in this scope
  return __sync_swap(&__cxa_unexpected_handler, func);
                                                    ^
Also, later getting warning about exception_ptr:

[ 13%] Building CXX object
projects/libcxx/lib/CMakeFiles/cxx.dir/__/src/exception.cpp.o
[ 13%] Building C object
projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins-x86_64.dir/ffsdi2.c.o
/home/evansl/dwnlds/llvm/3.5/rc4/sources/llvm-3.5.0rc4.src/projects/libcxx/src/exception.cpp:118:9:
warning: #warning is a GCC extension [enabled by default]
# warning uncaught_exception not yet implemented
         ^
/home/evansl/dwnlds/llvm/3.5/rc4/sources/llvm-3.5.0rc4.src/projects/libcxx/src/exception.cpp:118:9:
warning: #warning uncaught_exception not yet implemented [-Wcpp]

Is the __sync_swap error related to the subject of this post:

http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-May/036861.html

, and therefore, should the code in the downloaded
libcxxabi-3.5.0rc4.src.tar.xz be updated? Also, should I worry
about the warnings?

TIA.

-regards,
Larry

libc++abi can only be compiled by clang. __sync_swap() is a clang builtin. I believe the conclusion of the discussion about replacing those calls with std::atomic ended with deciding we couldn’t do it, though I don’t remember why.

Looking at the source, I think the warning about uncaught exception congress from libc++ not being able to find the libc++abi headers.

I should also mention that LLVM 3.5 has been released, and you should be using that instead of the release candidate.

libc++abi can only be compiled by clang. __sync_swap() is a clang builtin.

I tried to get cmake to use clang and clang++ by setting the environment
variables CC anc CXX; however, I got same error (see attached).
Is there some other way to cause libc++abi to be compiled by clang?

I believe the conclusion of the discussion about replacing those calls with
std::atomic ended with deciding we couldn't do it, though I don't remember
why.

Looking at the source, I think the warning about uncaught exception
congress from libc++ not being able to find the libc++abi headers.

OK. So to make lib++ using libc++abi *and* avoid the warnings,
libc++abi has to be *installed* first?

cmake.build.out (40.3 KB)

I seem to recall a small bootstrap issue. I think you can compile libc++ with gcc (and, err, libsupc++ or something), and then build libc++abi with clang and libc++, and then recompile libc++ against libc++abi.

This may be resolved with the cmake build system, but possibly only on trunk. I may also be making that up, or making it too complicated, my memory fails me.

Ben

OOPS. I'd applied the patch found the the post and forgot to remove
it when I tried to compile with clang and clang++; hence, the error had
nothing to do with previous error involving __sync_swap.

Trying again after reverting patch.

Sorry for noise.

[snip]

IIRC, the reason we didn't was that it would be a layering violation.

Jon