You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Ubuntu has released 20.04 LTS which includes GCC 9.3.0. When using this compiler it implements a much stricter (and often over-zealous) checking of string ops.
For instance:
In file included from /usr/include/string.h:495,
from /home/joe/code/cfecfs/github/tools/elf2cfetbl/elf2cfetbl.c:34:
In function ‘strncpy’,
inlined from ‘ProcessCmdLineOptions’ at /home/joe/code/cfecfs/github/tools/elf2cfetbl/elf2cfetbl.c:945:13:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ specified bound 32 equals destination size [-Werror=stringop-truncation]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
inlined from ‘ProcessCmdLineOptions’ at /home/joe/code/cfecfs/github/tools/elf2cfetbl/elf2cfetbl.c:939:13:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ specified bound 38 equals destination size [-Werror=stringop-truncation]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
To Reproduce
Build code with default config using GCC 9.3.0, with optimization enabled and full warnings.
Expected behavior
Code should build cleanly.
System observed on:
Ubuntu 20.04 LTS 64 bit.
Reporter Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered:
jphickey
added a commit
to jphickey/elf2cfetbl
that referenced
this issue
Apr 27, 2020
Describe the bug
Ubuntu has released 20.04 LTS which includes GCC 9.3.0. When using this compiler it implements a much stricter (and often over-zealous) checking of string ops.
For instance:
To Reproduce
Build code with default config using GCC 9.3.0, with optimization enabled and full warnings.
Expected behavior
Code should build cleanly.
System observed on:
Ubuntu 20.04 LTS 64 bit.
Reporter Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered: