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

Bug#215923: libc6-dev: [sparc] fails to compile with bits/fenv.h and -pedantic-errors



Package: libc6-dev
Version: 2.3.2-8
Severity: normal

When building the attached testcase with "-pedantic-errors", I get the
following error messages:

In file included from /usr/include/fenv.h:58,
                 from foo.c:1:
/usr/include/bits/fenv.h:54: error: ISO C restricts enumerator values to range of `int'
/usr/include/bits/fenv.h:58: error: ISO C restricts enumerator values to range of `int'

This is because the Sparc FPU control word values which you have used
are in an enum. The two values which are prohibited are (2<<30) and
(3<<30), because these are of type unsigned int, and not int. Therefore,
these should be moved out of the enum and directly into the preprocessor
constants, which are of type intmax_t, which is 64 bits on all
platforms that Debian supports. Alternatively, different values could be
used which are of type int.

24f0eb46a133ce4651340fe5551df82b *foo.c

-- System Information:
Debian Release: testing/unstable
Architecture: sparc
Kernel: Linux ryan-graves 2.4.21 #1 Thu Aug 7 20:30:12 EDT 2003 sparc64
Locale: LANG=C, LC_CTYPE=C (ignored: LC_ALL set to C)

Versions of packages libc6-dev depends on:
ii  libc6                         2.3.2-8    GNU C Library: Shared libraries an

-- no debconf information

#include <fenv.h>

int main(void)
{
	return 0;
}

Reply to: