I also submitted it as PR: https://github.com/OpenImageIO/oiio/pull/1529 <https://github.com/OpenImageIO/oiio/pull/1529>
Feel free to comment there and let us know if it works. If so, I'll merge it right away into all the active branches. > On Oct 12, 2016, at 10:25 AM, Ashley Retallack <[email protected]> > wrote: > > cool I'll give it a go and let you know. > > Ash > > > On 12 October 2016 at 17:50, Larry Gritz <[email protected] > <mailto:[email protected]>> wrote: > No, don't trouble yourself. Instead, I would appreciate if you could try > applying this patch (to the current RB-1.7 head): > > diff --git a/CMakeLists.txt b/CMakeLists.txt > index 00c51cf..5c22704 100644 > --- a/CMakeLists.txt > +++ b/CMakeLists.txt > @@ -147,6 +147,10 @@ if (CMAKE_COMPILER_IS_CLANG OR > CMAKE_COMPILER_IS_APPLECLANG) > APPLECLANG_VERSION_STRING VERSION_GREATER 6.1) > add_definitions ("-Wno-unused-local-typedefs") > endif () > + if (CLANG_VERSION_STRING VERSION_EQUAL 3.9 OR CLANG_VERSION_STRING > VERSION_GREATER 3.9) > + # Don't warn about using unknown preprocessor symbols in #if'set > + add_definitions ("-Wno-expansion-to-defined") > + endif () > endif () > > > > I don't have 3.9 installed, so I can't easily test it myself. > > This should at least disable the warnings, and then we can fix the code at > our leisure, ideally waiting until after homebrew adds a llvm39 package so > it's easy for me to test as I go. > > If this works for you, I'll merge it. > > >> On Oct 12, 2016, at 9:37 AM, Ashley Retallack <[email protected] >> <mailto:[email protected]>> wrote: >> >> Cool, >> >> Well I can start looking in to it if you like in the mean time I'll use a >> lower version. >> >> Cheers >> >> Ash >> >> On 12 October 2016 at 16:15, Larry Gritz <[email protected] >> <mailto:[email protected]>> wrote: >> I haven't tried clang 3.9 (though I use 3.8 regularly). >> >> Ugh, that's unfortunate. There are many places where we say things like >> >> #if A_SOMETIMES_DEFINED > 3 >> >> instead of the more verbose >> >> #if defined(A_SOMETIMES_DEFINED) && A_SOMETIMES_DEFINED > 3 >> >> I used to think the former was illegal but recently discovered that all the >> compilers seem to accept it without complaint and figured maybe it was fine >> all along and it was my understanding of C++ that was wrong. So I got in the >> habit of preferring this compact form and using it frequently. But this >> error implies that it was wrong all along and the compilers were very >> forgiving, but perhaps in the ever-tightening warning landscape it has >> finally fallen. >> >> We'll need to scour the whole codebase for constructs like that and replace >> them with the wordier version. >> >> Thanks for the alert. >> >> > On Oct 12, 2016, at 7:27 AM, Ashley Retallack <[email protected] >> > <mailto:[email protected]>> wrote: >> > >> > Hi all, >> > >> > Was wondering if anyone has tried building oiio 1.7 with clang 3.9.0. >> > >> > I've been trying and get the following: >> > >> > src/include/OpenImageIO/hash.h:54:37: error: macro expansion producing >> > 'defined' has undefined behavior >> > [-Werror,-Wexpansion-to-defined] >> > #if OIIO_CPLUSPLUS_VERSION >= 11 || OIIO_MSVS_AT_LEAST_2013 >> > >> > I can successfully build with gcc 4.8.4, just wanted to try and get clang >> > working. >> > >> > Any help much appreciated. >> > >> > Ash >> > _______________________________________________ >> > Oiio-dev mailing list >> > [email protected] <mailto:[email protected]> >> > http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org >> > <http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org> >> >> -- >> Larry Gritz >> [email protected] <mailto:[email protected]> >> >> >> _______________________________________________ >> Oiio-dev mailing list >> [email protected] <mailto:[email protected]> >> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org >> <http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org> >> >> _______________________________________________ >> Oiio-dev mailing list >> [email protected] <mailto:[email protected]> >> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org >> <http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org> > > -- > Larry Gritz > [email protected] <mailto:[email protected]> > > > > _______________________________________________ > Oiio-dev mailing list > [email protected] <mailto:[email protected]> > http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org > <http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org> > > > _______________________________________________ > Oiio-dev mailing list > [email protected] > http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org -- Larry Gritz [email protected]
_______________________________________________ Oiio-dev mailing list [email protected] http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
