saugustine added a comment.
Herald added a subscriber: JDevlieghere.

This change uses a variable-sized array, which is c99 only:

  
third_party/llvm/llvm-project/lldb/source/Expression/DWARFExpression.cpp:1300:30:
 error: variable length arrays are a C99 feature [-Werror,-Wvla-extension]
            uint8_t addr_bytes[size];
                               ^~~~
  
third_party/llvm/llvm-project/lldb/source/Expression/DWARFExpression.cpp:1300:30:
 note: read of non-const variable 'size' is not allowed in a constant expression
  
third_party/llvm/llvm-project/lldb/source/Expression/DWARFExpression.cpp:1242:15:
 note: declared here
        uint8_t size = opcodes.GetU8(&offset);

But I the size of the array is limited to only to the address size of the 
target machine, so converting that to a simple eight-byte array and then using 
size instead of sizeof(addr_bytes) should be fine. I have a change in testing 
to do that.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121408/new/

https://reviews.llvm.org/D121408

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to