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

Bug#273564: gcc-3.4: gcc -ftrapv aborts on 0 * (-1)



Package: gcc-3.4
Version: 3.4.2-2
Severity: important

gcc -ftrapv aborts 0 * (-1), e.g.

#include <stdio.h>
int main (void)
{
  volatile int i = 0, j = -1;
  printf ("%d", i * j);
  return 0;
}

After a search on the GCC bugzilla, it is

  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15526

which has been fixed.

This is important, because 0 * (-1) occurs so often (at least here)
that the -ftrapv option is currently almost useless.

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8
Locale: LANG=POSIX, LC_CTYPE=en_US.ISO8859-1

Versions of packages gcc-3.4 depends on:
ii  binutils                    2.15-4       The GNU assembler, linker and bina
ii  cpp-3.4                     3.4.2-2      The GNU C preprocessor
ii  gcc-3.4-base                3.4.2-2      The GNU Compiler Collection (base 
ii  libc6                       2.3.2.ds1-16 GNU C Library: Shared libraries an
ii  libgcc1                     1:3.4.2-2    GCC support library

-- no debconf information



Reply to: