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 <ashley.retall...@gmail.com> 
> 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
> Oiio-dev@lists.openimageio.org
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

--
Larry Gritz
l...@larrygritz.com


_______________________________________________
Oiio-dev mailing list
Oiio-dev@lists.openimageio.org
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to