On Sun, Aug 13, 2017 at 12:46:13PM -0500, Barry Smith wrote:
> 
>    On my Mac with the default clang compilers and 
> 
> ./configure  --with-debugging=0 --CFLAGS="-std=c89 -pedantic -Wno-long-long 
> -Wno-overlength-strings"
> 
> make gives
> 
>           CC arch-mpich/obj/src/sys/ftn-custom/zsys.o
> In file included from 
> /Users/barrysmith/Src/petsc/src/sys/info/ftn-auto/verboseinfof.c:1:
> In file included from /Users/barrysmith/Src/petsc/include/petscsys.h:439:
> /Users/barrysmith/Src/petsc/include/petscmath.h:425:10: warning: compound 
> literals are a C99-specific feature [-Wc99-extensions]
> In file included from 
> /Users/barrysmith/Src/petsc/src/sys/info/verboseinfo.c:6:
> In file included from 
> /Users/barrysmith/Src/petsc/include/petsc/private/petscimpl.h:8:
> In file included from /Users/barrysmith/Src/petsc/include/petscsys.h:439:
> /Users/barrysmith/Src/petsc/include/petscmath.h  return CMPLX(x,y);
>          ^
> /usr/include/complex.h:60:5: note: expanded from macro 'CMPLX'
>     (double _Complex){(__real),(__imag)} \
>     ^
> :425:10: warning: compound literals are a C99-specific feature 
> [-Wc99-extensions]
>   return CMPLX(x,y);
>          ^
> /usr/include/complex.h:60:5: note: expanded from macro 'CMPLX'
>     (double _Complex){(__real),(__imag)} \
>     ^
> 
> I think you need to add some protection that prevents this path from being 
> taking with std c89

Why is a compiler with "-std=c89" letting a macro with a `(double
_Complex)` type cast compile in the first place?

> 
>    Thanks
>    Barry
> 

Attachment: signature.asc
Description: PGP signature

Reply via email to