libelfin
libelfin copied to clipboard
don't use a VLA just to compute a buffer size
VLAs in C++ are compiler extensions, and clang 18 will complain about it.
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/libelfin/+bug/2060786 Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1065084
I wonder why the compiler doesn't complain about similar lines of code like:
https://github.com/aclements/libelfin/blob/ca2b127a7a9ea5685873816805609b80e254b4da/dwarf/small_vector.hh#L24
In the case you pointed to, Min is not a variable but a template parameter, i.e. a compile-time constant.