public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/47830] New: errors in intrinsics/c99_functions.c
@ 2011-02-21  8:26 kuehro at gmx dot de
  2011-02-21  9:45 ` [Bug libfortran/47830] " burnus at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: kuehro at gmx dot de @ 2011-02-21  8:26 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: errors in intrinsics/c99_functions.c
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libfortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: kuehro@gmx.de


Since 2007-08 roundl() has a version for systems that lack ceill but
have nextafterl. This is the case on NetBSD know. There are two
errors making it non-compileable. Line numbers are different
depending on gcc version, so please change

      static long double prechalf = nexafterl (0.5L, LDBL_MAX);

to

      long double prechalf = nextafterl (0.5L, LDBL_MAX);


This is the orginal code in the latest snapshot:

#else

/* Poor version of roundl for system that don't have ceill.  */
long double
roundl (long double x)
{
  if (x > DBL_MAX || x < -DBL_MAX)
    {
#ifdef HAVE_NEXTAFTERL
      static long double prechalf = nexafterl (0.5L, LDBL_MAX);
#else
      static long double prechalf = 0.5L;
#endif
      return (GFC_INTEGER_LARGEST) (x + (x > 0 ? prechalf : -prechalf));
    }
  else
    /* Use round().  */
    return round ((double) x);
}

#endif
#endif


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-02-22 12:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-21  8:26 [Bug libfortran/47830] New: errors in intrinsics/c99_functions.c kuehro at gmx dot de
2011-02-21  9:45 ` [Bug libfortran/47830] " burnus at gcc dot gnu.org
2011-02-21 10:42 ` kuehro at gmx dot de
2011-02-21 12:05 ` burnus at gcc dot gnu.org
2011-02-22 12:43 ` burnus at gcc dot gnu.org
2011-02-22 12:44 ` burnus at gcc dot gnu.org
2011-02-22 12:54 ` burnus at gcc dot gnu.org
2011-02-22 12:55 ` burnus at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).