New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build of ADT/SmallPtrSet fails #1606
Comments
The code in question is this: template It does look wrongish and stuff. Are we depending on a compiler feature here? |
N certainly is a constant. what version of G++ are you compiling with? |
I use the default g++ that comes with MacOSX 10.4 (g++ 4.1?). I don't have I think the compiler is wrong; I've extracted the NextPowerOfTwo stuff and Also, I don't think that it is the "(N|(N-1))+1" part that causes the problem 191: NextVal = (N|(N-1)) + 1, Maybe, it is the fact that NextPowerOfTwo::Val is "forward declared" when This is all from memory right now, but I'll post more detailed information later |
$ g++ --version I've compiled the NextPowerOfTwo stuff seperately and if line 192 is changed from If line 192 is changed into "Val = NextPowerOfTwo<1>::Val" I get the following error for that line: error: incomplete type ‘NextPowerOfTwo<1u>’ used in nested name specifier There is no other error reported: nothing about N or line 191. |
Does it work if you change it to: ? -Chris |
Yes, that works! |
Okay, very strange compiler bug. Easy enough to work around though: Thanks! BTW, I recommend downloading the latest Xcode from developer.apple.com, there are several issues with -Chris |
…29f533762e233259573c [lldb] Fix bug in skipIfRosetta decorator
Extended Description
Building CVS HEAD on MacOSX fails with the following error:
$ make
make[1]: Nothing to be done for `all'.
llvm[1]: Compiling SmallPtrSet.cpp for Debug build
/Users/andreas/build/llvmHEAD/llvm/include/llvm/ADT/SmallPtrSet.h:191: error: non-constant ‘((N |
(N - 1)) + 1)’ cannot be used as template argument
/Users/andreas/build/llvmHEAD/llvm/include/llvm/ADT/SmallPtrSet.h:191: error: ‘Val’ is not a
member of ‘’
make[1]: *** [/Users/andreas/build/llvmHEAD/llvm/lib/Support/Debug/SmallPtrSet.o] Error 1
make: *** [all] Error 1
The text was updated successfully, but these errors were encountered: