Hi All!

While building I started to get this error:

../../gcc-master/gcc/opts.c: In function ‘void print_filtered_help(unsigned int, unsigned int, unsigned int, unsigned int, gcc_options*, unsigned int)’: ../../gcc-master/gcc/opts.c:1497:26: error: ‘ ’ directive output may be truncated writing 2 bytes into a region of size between 1 and 256 [-Werror=format-truncation=]
 1497 |                       "%s  %s", help, _(use_diagnosed_msg));
      |                          ^~
../../gcc-master/gcc/opts.c:1496:22: note: ‘snprintf’ output 3 or more bytes (assuming 258) into a destination of size 256
 1496 |             snprintf (new_help, sizeof new_help,
      |             ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
 1497 |                       "%s  %s", help, _(use_diagnosed_msg));
      |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

My guess is that it is due to the use of the flag "-fstrict-overflow"

I am not complaining or saying that this is a bug, but the whole code compiles fine with this flag except for this single instance...

Thank you very much.

Best regards,
José Rui

Reply via email to