This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/47830] errors in intrinsics/c99_functions.c
- From: "kuehro at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 21 Feb 2011 10:38:17 +0000
- Subject: [Bug libfortran/47830] errors in intrinsics/c99_functions.c
- Auto-submitted: auto-generated
- References: <bug-47830-4@http.gcc.gnu.org/bugzilla/>
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