Re: [Gdcm2] Building GDCM with clang: Question for Niels !
Cross-platform DICOM implementation
Brought to you by:
malat
From: Mathieu M. <mat...@gm...> - 2010-06-29 19:17:14
|
Niels, I am sure you'll llove this one: this is a C++ question. What do you think of the following piece of code: struct ValueInt { ValueInt(int v = 0) : ValueLength(v) {} operator int () const { return ValueLength; } private: int ValueLength; }; int main(int, char *[]) { int *a = new int[ ValueInt(10) ]; return 0; } the clang compiler apparently cannot digest that. Any comment ? Very much appreciate -Mathieu Ps: Sean could you please try to compile this small example with clang as I cannot get it installed on my debian box for now... On Tue, Jun 29, 2010 at 9:06 PM, Sean McBride <se...@ro...> wrote: > Mathieu, > > Thanks for taking a look. > > They claim full C++98 conformance: > <http://clang.llvm.org/cxx_status.html> > > It is able to build boost and CMake for example. > > but its C++ support is new, and bugs are certainly possible. > > The first one to try to fix is: > > internal = new ArrayType[bv->GetLength()]; // over allocation > ^~~~~~~~~~~~~~~ > > which is repeated many times.... > > > On Tue, 29 Jun 2010 20:31:11 +0200, Mathieu Malaterre said: > >>Sean, >> >> Thanks a lot for providing this dashboard. I have been looking at >>the errors, but it looks like clang is yet fully C++98 conformant. Is >>there a conformance statement somewhere ? >> >>Thanks >> >>On Fri, Jun 18, 2010 at 4:13 PM, Sean McBride <se...@ro...> > wrote: >>> Hi Mathieu and everyone, >>> >>> I've set up a dashboard to build GDCM using clang (a new open source >>> compiler). It doesn't compile currently. :( clang's C++ support is new, >>> but supposedly pretty good at this point. >>> >>> First results here: >>> <http://www.cdash.org/CDash/viewBuildError.php?buildid=639296> >>> >>> It looks like a lot of errors, but many are simply repeated. >>> >>> I'm neither a C++ nor a GDCM expert, it would be great if you could take >>> a look. I'm hoping this will be easy to get compiling! > > -- Mathieu |