This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Missing prototype for ldexp in real.h
- To: gcc-patches at gcc dot gnu dot org
- Subject: Missing prototype for ldexp in real.h
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Fri, 9 Jun 2000 15:31:08 -0400 (EDT)
The following patch squelches many warnings about the missing prototype
declaration for ldexp when building under vax-ultrix. The following warnings
remain:
../../gcc/real.c:586: warning: function declaration isn't a prototype
../../gcc/real.c:665: warning: function declaration isn't a prototype
../../gcc/real.c:688: warning: function declaration isn't a prototype
../../gcc/real.c:762: warning: function declaration isn't a prototype
../../gcc/real.c:779: warning: function declaration isn't a prototype
../../gcc/real.c:802: warning: function declaration isn't a prototype
../../gcc/real.c:824: warning: function declaration isn't a prototype
../../gcc/real.c:891: warning: function declaration isn't a prototype
../../gcc/real.c:945: warning: function declaration isn't a prototype
../../gcc/real.c:989: warning: function declaration isn't a prototype
../../gcc/real.c:1212: warning: function declaration isn't a prototype
../../gcc/real.c:1228: warning: function declaration isn't a prototype
../../gcc/real.c:1243: warning: function declaration isn't a prototype
../../gcc/real.c:1258: warning: function declaration isn't a prototype
../../gcc/real.c:1276: warning: function declaration isn't a prototype
../../gcc/real.c:1290: warning: function declaration isn't a prototype
../../gcc/real.c:1303: warning: function declaration isn't a prototype
../../gcc/real.c: In function `e113toe':
../../gcc/real.c:3316: warning: unused variable `i'
../../gcc/real.c: At top level:
../../gcc/real.c:6329: warning: function declaration isn't a prototype
../../gcc/real.c:6360: warning: function declaration isn't a prototype
../../gcc/real.c:6396: warning: function declaration isn't a prototype
../../gcc/real.c:6433: warning: function declaration isn't a prototype
../../gcc/real.c:6858: warning: function declaration isn't a prototype
../../gcc/real.c:1628: warning: `eisinf' defined but not used
../../gcc/real.c:1646: warning: `eisnan' defined but not used
The large number of "function declaration isn't a prototype" warnings
occur since REAL_ARITHMETIC is not defined and the prototypes for
the functions are inside an #ifdef in real.h. This suggests that
the functions are only needed when REAL_ARITHMETIC is defined. If
this is the case, they could be put inside #ifdef REAL_ARITHMETIC's.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
2000-06-09 J. David Anglin <dave@hiauly1.hia.nrc.ca>
* real.h: Add prototype for ldexp.
--- real.h.orig Wed Apr 12 13:07:46 2000
+++ real.h Fri Jun 9 14:12:30 2000
@@ -359,7 +359,7 @@
/* Scale X by Y powers of 2. */
#ifndef REAL_VALUE_LDEXP
#define REAL_VALUE_LDEXP(x, y) ldexp (x, y)
-extern double ldexp ();
+extern double ldexp PARAMS ((double, int));
#endif
/* Convert the string X to a floating-point value. */