Bug 10103 - Targets defining __NO_LONG_DOUBLE_MATH should still have *l prototypes in headers.
Summary: Targets defining __NO_LONG_DOUBLE_MATH should still have *l prototypes in hea...
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.10
: P2 normal
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-24 20:29 IST by Carlos O'Donell
Modified: 2014-06-30 09:17 IST (History)
3 users (show)

See Also:
Host: hppa-linux-gnu
Target: hppa-linux-gnu
Build: hppa-linux-gnu
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos O'Donell 2009-04-24 20:29:55 IST
Many targets in ports, ARM, and HPPA to name two, do not have long double math,
but the compiler treats double and long double as distinct types even though
they have the same size. The GNU C library currently creates aliases to all the
*l functions when long-double-fcts = no, but fails to create *l prototypes in
the headers. To be ISO C99 conforming the headers must have *l prototypes.

Jakub Jelinek proposes a patch here:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39491#c21

Joseph Myers has verified that this patch works for ARM here:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39491#c24

Carlos O'Donell has verified that this path works for HPPA here:

Jakub, could you please attach your patch to this issue with a proper ChangeLog?
I would like this patch to be reviewed and checked into glibc.

Thanks.
Comment 1 Carlos O'Donell 2009-04-24 20:32:08 IST
Carlos O'Donell has verified that this path works for HPPA here:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39491#c25
Comment 3 Carlos O'Donell 2009-04-27 17:01:23 IST
I tested the following patch on hppa:
http://sources.redhat.com/ml/libc-hacker/2009-04/msg00004.html

No regressions. However, I don't see the long double prototypes.

The port sets __NO_LONG_DOUBLE_MATH set to 1, and I verified this.
The build sets NO_LONG_DOUBLE to 1 because the port sets long-double-fcts = no.

Compiling test-ldouble.c with -Werror fails because of the missing prototypes.
math/libm-test.c:5446: warning: implicit declaration of function ‘scalbl’
math/libm-test.c: In function ‘scalbn_test’:
Comment 4 Andreas Schwab 2011-11-04 14:25:09 IST
Fixed in master.