On Mon, Jul 11, 2016 at 4:27 PM, Ian Lance Taylor <i...@google.com> wrote: > On Mon, Jul 11, 2016 at 1:05 PM, Brooks Moses <bmo...@google.com> wrote: >> Ping? > > This is fine, but please add a comment explaining why the code avoids > 0-length VLAs. Thanks.
Thanks! Committed as r238233. This is the comment I added: + /* Avoid zero-length VLAs, which are prohibited by the C99 standard + and flagged as errors by Address Sanitizer. */ + __extension__ struct d_saved_scope scopes[(dpi.num_saved_scopes > 0) + ? dpi.num_saved_scopes : 1]; + __extension__ struct d_print_template temps[(dpi.num_copy_templates > 0) + ? dpi.num_copy_templates : 1]; - Brooks