This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/81163] error: ‘snprintf’ output may be truncated before the last format character [-werror=format-truncation=] note: ‘snprintf’ output between 2 and 266 bytes into a destination of size 255


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81163

Alexander Perfeito <perfeitoan at hotmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |---

--- Comment #4 from Alexander Perfeito <perfeitoan at hotmail dot com> ---
(In reply to Martin Liška from comment #1)
> Can you please provide pre-processed source file (-E) and full command line
> that's passed to GCC?

The source file I put attach 

Here the command line in makefile using gcc

HOSTCC       = gcc
HOSTCXX      = g++
HOSTCFLAGS   = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2
-fomit-frame-pointer
HOSTCXXFLAGS = -O2

Error in snprintf gcc 7.1.1 registred by Makefile

# Handle descending into subdirectories listed in $(vmlinux-dirs)
# Preset locale variables to speed up the build process. Limit locale
# tweaks to this spot to avoid wrong language settings when running
# make menuconfig etc.
# Error messages still appears in the original language

PHONY += $(vmlinux-dirs)
$(vmlinux-dirs): prepare scripts
        $(Q)$(MAKE) $(build)=$@

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]