gcc-12 development version gives an array-bounds warning about techtools.c code. I reported that to gcc bugtracker ( https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102405 ), but the report was deemed invalid; compiler does not have enough information to know that the warning is baseless so they consider it ok to show. Unfortunately I don't see any sensible way to rework the code so that it would not trigger the warning, and -Werror (which we use in development with --enable-debug) turns it to an error. The only solution seems to be to disable -Warray-bounds warnings completely.
gcc-12 development version gives an array-bounds warning about techtools.c code. I reported that to gcc bugtracker ( https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102405 ), but the report was deemed invalid; compiler does not have enough information to know that the warning is baseless so they consider it ok to show. Unfortunately I don't see any sensible way to rework the code so that it would not trigger the warning, and -Werror (which we use in development with --enable-debug) turns it to an error. The only solution seems to be to disable -Warray-bounds warnings completely.