On Tue, 19 Nov 2024 11:16:04 +0100
Mattias Rönnblom <hof...@lysator.liu.se> wrote:

> On 2024-11-12 03:02, Andre Muezerie wrote:
> > 1) MSVC does not support VLAs. Use standard fixed C arrays of
> > maximum size required instead.
> > 
> > 2) ../usr/lib/gcc/x86_64-redhat-linux/13/include/emmintrin.h:742:8:
> >      error: array subscript 9 is outside array bounds of 'uint64_t[16]'
> >      {aka 'long unsigned int[16]'} [-Werror=array-bounds=]
> >     3695 742 | *__P = __B;
> > 
> > Compile with -Wno-array-bounds to avoid false positives when
> > using gcc version 11 or newer (gcc compiler bug/limitation).
> > 
> > Signed-off-by: Andre Muezerie <andre...@linux.microsoft.com>
> > ---
> >   app/test/meson.build            |  5 +++
> >   app/test/test_bitset.c          | 55 +++++++++++++++++++--------------
> >   app/test/test_lcore_var_perf.c  |  2 +-
> >   app/test/test_reassembly_perf.c |  4 +--
> >   4 files changed, 39 insertions(+), 27 deletions(-)
> > 
> > diff --git a/app/test/meson.build b/app/test/meson.build
> > index 40f22a54d5..e7419a611b 100644
> > --- a/app/test/meson.build
> > +++ b/app/test/meson.build
> > @@ -249,6 +249,11 @@ foreach d:optional_deps
> >       endif
> >   endforeach
> >   
> > +# Bugzilla ID: 678  
> 
> Mention which bugzilla.
> 
> > +if (toolchain == 'gcc' and cc.version().version_compare('>=11.0.0'))
> > +    cflags += '-Wno-array-bounds'
> > +endif
> > +

Do not turn off warnings globally, better to reduce this down to minimum
scope with pragma instead.

Reply via email to