Build failure due to format-truncation

José Rui Faustino de Sousa jrfsousa@gmail.com
Wed Jun 16 17:21:35 GMT 2021


On 16/06/21 16:53, Martin Sebor wrote:
> -fstrict-overflow isn't related to the warning or to sprintf (it
> controls whether signed integer overflow is considered undefined).
> 
> The warning above tells you that if help points to a string that's
> 255 characters long the snprintf output will be truncated.  This
> warning is only issued at level 2 (-Wformat-truncation=2) which
> points out more instances of possible truncation than the more
> conservative level 1.
> 

These are the flags I use to build gcc:

-O0 -g3 -ggdb3 -gdwarf-4 -fvar-tracking-assignments 
-fno-omit-frame-pointer -fstrict-overflow -fstack-check

I have been using these flags for more than a year now, it just started 
failing recently.

Maybe this is due to some other, deeper, issue?

Thank you very much.

Best regards,
José Rui

P.S.- from config.log:

   $ ../gcc-local/configure --prefix=/opt/gcc/gcc-local --enable-debug 
--enable-checking --enable-valgrind-annotations --disable-multilib 
CFLAGS= -O0 -g3 -ggdb3 -gdwarf-4 -fvar-tracking-assignments 
-fno-omit-frame-pointer -fstrict-overflow -fstack-check   CXXFLAGS= -O0 
-g3 -ggdb3 -gdwarf-4 -fvar-tracking-assignments -fno-omit-frame-pointer 
-fstrict-overflow -fstack-check   --enable-languages=c,c++,fortran,lto 
--no-create --no-recursion



More information about the Gcc mailing list