Re: [darktable-dev] compiler warnings regarding variable length arrays

2017-09-24 Thread Roman Lebedev
On Sun, Sep 24, 2017 at 11:39 AM, johannes hanika wrote: > hi, Hi. > i disagree. i really like variable length arrays > and std::vectors dynamically allocate memory on the heap https://llvm.org/docs/ProgrammersManual.html#dss-smallvector > with standard implementations locking a global mutex >

Re: [darktable-dev] compiler warnings regarding variable length arrays

2017-09-24 Thread Tobias Ellinghaus
Am Sonntag, 24. September 2017, 21:39:33 CEST schrieb johannes hanika: > hi, > > i disagree. i really like variable length arrays. and std::vectors > dynamically allocate memory on the heap, with standard implementations > locking a global mutex on the way, causing slowdown for multithreaded > cas

Re: [darktable-dev] compiler warnings regarding variable length arrays

2017-09-24 Thread johannes hanika
hi, i disagree. i really like variable length arrays. and std::vectors dynamically allocate memory on the heap, with standard implementations locking a global mutex on the way, causing slowdown for multithreaded cases. just incrementing the stack pointer is a simple thing, it's thread local and li

Re: [darktable-dev] compiler warnings regarding variable length arrays

2017-09-22 Thread Heiko Bauke
Hi, Am 22.09.2017 um 15:35 schrieb Tobias Ellinghaus: No, you are missing the point of those pragmas: darktable from git always builds with "-Werror", thus the "-Wvla" switch actually throws an hard error when using VLAs. With the pragma we are relaxing that back to a warning again to be able to

Re: [darktable-dev] compiler warnings regarding variable length arrays

2017-09-22 Thread Tobias Ellinghaus
Am Freitag, 22. September 2017, 13:40:09 CEST schrieb Heiko Bauke: > Hi, > > Am 22.09.2017 um 10:15 schrieb Tobias Ellinghaus: > > IIRC there was some problem with obscure alternate libc implementations > > that had too little stack size or something like that. > > yes, something like that: > htt

Re: [darktable-dev] compiler warnings regarding variable length arrays

2017-09-22 Thread Heiko Bauke
Hi, Am 22.09.2017 um 10:15 schrieb Tobias Ellinghaus: IIRC there was some problem with obscure alternate libc implementations that had too little stack size or something like that. yes, something like that: https://www.securecoding.cert.org/confluence/display/c/ARR32-C.+Ensure+size+arguments+

Re: [darktable-dev] compiler warnings regarding variable length arrays

2017-09-22 Thread Tobias Ellinghaus
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-w

[darktable-dev] compiler warnings regarding variable length arrays

2017-09-21 Thread 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) Fur