[LLVMdev] Fw: llvm-gcc not compatible with gcc on a small case?

Duncan Sands baldrick at free.fr
Wed Nov 10 00:35:10 PST 2010


Hi Isaac,

On 10/11/10 04:39, Isaac Dupree wrote:
> On 11/09/10 22:27, Samuel Crow wrote:
>>> It shouldn't compile.  You have the method declared inside the templated class
>>> thus indicating infinite recursion.
>
> No, the method is not in the class.  It is a function that returns a
> T<4>  and takes (approximately) a reference to a multidimensional array
> of T<4>s.  In fact it compiles fine for me, with no warnings, under both
> g++ -Wall -c thing.cpp  # version 4.5.1
> clang++ -Wall -c thing.cpp  # version 2.8
>
> Perhaps gcc-4.2 (the base GCC version of llvm-gcc, unless you have a
> really old one, check llvm-gcc --version ?) gets confused about that
> code, or such?

gcc-4.2 compiles this happily, so presumably it is due to Apple modifications
(llvm-gcc is based on Apple's modified version of gcc-4.2).  For what it is
worth, dragonegg compiles this fine, as does clang.

Ciao,

Duncan.



More information about the llvm-dev mailing list