[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#178386: gcc-3.2: Warns wrong about unreachable code

Package: gcc-3.2
Version: 1:3.2.1-0pre3
Severity: normal

Hash: SHA1

gcc-3.2 -Wall -pedantic -ansi -Werror -march=i486 -mcpu=i486 -Os	\
       -Wunreachable-code -g -o salt-generator salt-generator.c
cc1: warnings being treated as errors
salt-generator.c: In function `main':
salt-generator.c:47: warning: will never be executed
make: *** [salt-generator] Error 1

Line 47 is the "do {" line below. Lines around it are:
		for (x = 0; x < SALT_SIZE; ++x) {
			do {
				errno = 0;
				read_cnt = read(rand, &buf, 1);
			} while (read_cnt == -1 && (errno == EINTR || errno == EAGAIN));
SALT_SIZE is 16.

Fully pre-processed source comming up as soon as I get the bug number to
mail it to.

anthony@bohr:salt-generator$ gcc-3.2 -v
Reading specs from /usr/lib/gcc-lib/i386-linux/3.2.1/specs
Configured with: /mnt/data/gcc-3.1/gcc-3.2-3.2.1ds2/src/configure -v --enable-languages=c,c++,java,f77,proto,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-java-gc=boehm --enable-objc-gc i386-linux
Thread model: posix
gcc version 3.2.1 20020924 (Debian prerelease)

- -- System Information
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux bohr 2.4.16 #2 SMP Wed Nov 28 05:25:00 EST 2001 i686
Locale: LANG=en_US, LC_CTYPE=en_US

Versions of packages gcc-3.2 depends on:
ii  binutils         The GNU assembler, linker and bina
ii  cpp-3.2                   1:3.2.1-0pre3  The GNU C preprocessor.
ii  gcc-3.2-base              1:3.2.1-0pre3  The GNU Compiler Collection (base 
ii  libc6                     2.2.5-14.3     GNU C Library: Shared libraries an
ii  libgcc1                   1:3.2.1-0pre3  GCC support library.

Version: GnuPG v1.2.0 (GNU/Linux)


Reply to: