This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libfortran/47830] errors in intrinsics/c99_functions.c


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

--- Comment #2 from Kai-Uwe Eckhardt <kuehro at gmx dot de> 2011-02-21 10:38:16 UTC ---
Hi,

> > There are two errors
> 
> For those having - like me - problems to spot the second error:
> 
> >       static long double prechalf = nexafterl (0.5L, LDBL_MAX);
> >              long double prechalf = nextafterl (0.5L, LDBL_MAX);

well besides the typo nexfaterl declaring a variable static in
block scope is evaluated as a const qualifier which cannot be
assigned using a function. At least the default compiler on
NetBSD gcc-4.1.3 tells me so. I tried to look it up in the C99
standard, if this is a compiler error or not. Mabey it would be cleaner
to put the declaration at the beginning of the function roundl.

Kai-Uwe Eckhardt


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]