This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Compilation warning in simple-object-xcoff.c
- From: Eli Zaretskii <eliz at gnu dot org>
- To: gcc-patches at gcc dot gnu dot org
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 16 Jan 2018 19:45:16 +0200
- Subject: Compilation warning in simple-object-xcoff.c
- Authentication-results: sourceware.org; auth=none
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
Compiling GDB 8.0.91 with mingw.org's MinGW GCC 6.0.3 produces this
warning in libiberty:
gcc -c -DHAVE_CONFIG_H -O2 -gdwarf-4 -g3 -D__USE_MINGW_ACCESS -I. -I./../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic -D_GNU_SOURCE ./simple-object-xcoff.c -o simple-object-xcoff.o
./simple-object-xcoff.c: In function 'simple_object_xcoff_find_sections':
./simple-object-xcoff.c:605:25: warning: left shift count >= width of type [-Wshift-count-overflow]
x_scnlen = x_scnlen << 32
^~
And indeed x_scnlen is declared as a 32-bit data type off_t.
I'm willing to test patches if needed.
Thanks.