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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
This seems to have been fixed as a result of introducing -Wformat-truncation in
r244210.  Resolving as a duplicate of 77708.

For the record, here's the output at the default setting of the -Wformat-length
and -Wformat-truncation options with today's top of trunk:

$ (set -x; for o in 0 1 2; do gcc -O$o -S -Wformat -Wformat-length
-Wformat-truncation algapi.i; done)
+ for o in 0 1 2
+ /build/gcc-svn/gcc/xgcc -B /build/gcc-svn/gcc -O0 -S -Wformat -Wformat-length
-Wformat-truncation algapi.i
+ for o in 0 1 2
+ /build/gcc-svn/gcc/xgcc -B /build/gcc-svn/gcc -O1 -S -Wformat -Wformat-length
-Wformat-truncation algapi.i
+ for o in 0 1 2
+ /build/gcc-svn/gcc/xgcc -B /build/gcc-svn/gcc -O2 -S -Wformat -Wformat-length
-Wformat-truncation algapi.i

And here's the output at level 2:

$ (set -x; for o in 0 1 2 3; do gcc -O$o -S -Wformat -Wformat-length=2
-Wformat-truncation=2 algapi.i; done)
+ for o in 0 1 2 3
+ /build/gcc-svn/gcc/xgcc -B /build/gcc-svn/gcc -O0 -S -Wformat
-Wformat-length=2 -Wformat-truncation=2 algapi.i
crypto/algapi.c: In function ‘crypto_inst_setname’:
crypto/algapi.c:817:6: warning: ‘%s’ directive output may be truncated writing
between 1 and 63 bytes into a region of size 62 [-Wformat-truncation=]
crypto/algapi.c:817:6: note: format output between 5 and 67 bytes into a
destination of size 64
+ for o in 0 1 2 3
+ /build/gcc-svn/gcc/xgcc -B /build/gcc-svn/gcc -O1 -S -Wformat
-Wformat-length=2 -Wformat-truncation=2 algapi.i
crypto/algapi.c: In function ‘crypto_inst_setname’:
crypto/algapi.c:817:6: warning: ‘%s’ directive output may be truncated writing
between 1 and 63 bytes into a region of size 62 [-Wformat-truncation=]
crypto/algapi.c:817:6: note: format output between 5 and 67 bytes into a
destination of size 64
+ for o in 0 1 2 3
+ /build/gcc-svn/gcc/xgcc -B /build/gcc-svn/gcc -O2 -S -Wformat
-Wformat-length=2 -Wformat-truncation=2 algapi.i
crypto/algapi.c: In function ‘crypto_inst_setname’:
crypto/algapi.c:817:6: warning: ‘%s’ directive output may be truncated writing
between 1 and 63 bytes into a region of size 62 [-Wformat-truncation=]
crypto/algapi.c:817:6: note: format output between 5 and 67 bytes into a
destination of size 64
crypto/algapi.c: In function ‘crypto_alloc_instance2’:
crypto/algapi.c:817:6: warning: ‘%s’ directive output may be truncated writing
between 1 and 63 bytes into a region of size 62 [-Wformat-truncation=]
crypto/algapi.c:817:6: note: format output between 5 and 67 bytes into a
destination of size 64
+ for o in 0 1 2 3
+ /build/gcc-svn/gcc/xgcc -B /build/gcc-svn/gcc -O3 -S -Wformat
-Wformat-length=2 -Wformat-truncation=2 algapi.i
crypto/algapi.c: In function ‘crypto_inst_setname’:
crypto/algapi.c:817:6: warning: ‘%s’ directive output may be truncated writing
between 1 and 63 bytes into a region of size 62 [-Wformat-truncation=]
crypto/algapi.c:817:6: note: format output between 5 and 67 bytes into a
destination of size 64
crypto/algapi.c: In function ‘crypto_alloc_instance2’:
crypto/algapi.c:817:6: warning: ‘%s’ directive output may be truncated writing
between 1 and 63 bytes into a region of size 62 [-Wformat-truncation=]
crypto/algapi.c:817:6: note: format output between 5 and 67 bytes into a
destination of size 64
crypto/algapi.c: In function ‘crypto_alloc_instance’:
crypto/algapi.c:817:6: warning: ‘%s’ directive output may be truncated writing
between 1 and 63 bytes into a region of size 62 [-Wformat-truncation=]
crypto/algapi.c:817:6: note: format output between 5 and 67 bytes into a
destination of size 64

*** This bug has been marked as a duplicate of bug 77708 ***

Reply via email to