Package: gcc-4.1 Version: 4.1.1-21 Severity: important Hi,
C99 requires that code that tests floating-point state flags (or frobs other bits of the floating-point environment) calls #pragma STDC FENV_ACCESS ON: "If part of an application tests floating-point status flags, sets floating-point control modes, or runs under non-default mode settings, but was translated with the state for the FENV_ACCESS pragma off, the behavior is undefined." (7.6.1.2) Yet, if you do this in gcc with -Wall turned on, you get a warning message: [EMAIL PROTECTED]:/tmp$ cat test.c #include <stdio.h> #include <fenv.h> int main(void) { #pragma STDC FENV_ACCESS ON if(feclearexcept(FE_ALL_EXCEPT)) printf("feclearexcept failed\n"); else printf("feclearexcept succeeded\n"); return 0; } [EMAIL PROTECTED]:/tmp$ gcc -std=gnu99 -Wall test.c -lm test.c: In function ‘main’: test.c:6: warning: ignoring #pragma STDC FENV_ACCESS [EMAIL PROTECTED]:/tmp$ ./a.out feclearexcept succeeded [EMAIL PROTECTED]:/tmp$ It's obviously buggy to emit a warning on standards-mandated behaviour! I know you can turn this warning off with -Wno-unknown-pragmas, but that's not something you want to be doing in production code. Regards, Matthew -- System Information: Debian Release: 4.0 APT prefers stable APT policy: (500, 'stable') Architecture: amd64 (x86_64) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.20-2-macpro-amd64 Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Versions of packages gcc-4.1 depends on: ii binutils 2.17-3 The GNU assembler, linker and bina ii cpp-4.1 4.1.1-21 The GNU C preprocessor ii gcc-4.1-base 4.1.1-21 The GNU Compiler Collection (base ii libc6 2.3.6.ds1-13etch7 GNU C Library: Shared libraries ii libgcc1 1:4.1.1-21 GCC support library ii libssp0 4.1.1-21 GCC stack smashing protection libr Versions of packages gcc-4.1 recommends: ii libc6-dev 2.3.6.ds1-13etch7 GNU C Library: Development Librari pn libmudflap0-dev <none> (no description available) -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]