Am Donnerstag, 21. September 2017, 18:02:40 CEST schrieb Heiko Bauke:
> Hi,
> 
> darktable is written in C99, which has introduced variable length arrays
> into the C programming language.  This feature is used several times in
> the darktable source.   Therefore, I wonder why the file
> compiler-warnings.cmake contains the line
> 
> CHECK_COMPILER_FLAG_AND_ENABLE_IT(-Wvla)
> 
> Furthermore, the darktable source contains at several places the pragma
> 
> #pragma GCC diagnostic warning "-Wvla"
> 
> I do not understand why these warnings are enforced.  In the case that
> there is something wrong with variable length arrays we should avoid
> them completely.  Otherwise one should remove the warnings.

I agree that it's strange to have those warnings, and I personally like using 
VLAs. IIRC there was some problem with obscure alternate libc implementations 
that had too little stack size or something like that. I guess Roman can tell 
you the reason.

>       Heiko

Tobias

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to