tags 340871 + patch
thanks
Stephen R Marenka <stephen@marenka.net> writes:
On Sat, Feb 25, 2006 at 11:36:53PM +0000, Roger Leigh wrote:
--- m68kmath/mathinline.h 2006-02-21 18:26:28.000000000 +0000
+++ mathinline.h 2006-02-25 23:30:48.000000000 +0000
@@ -100,7 +100,7 @@
/* Define a const math function. */
#define __m81_defun(rettype, func, args) \
__m81_inline rettype __attribute__((__const__)) \
- __m81_u(func) args
+ __m81_u(func) args __THROW
No joy.
This was in fact the solution. It just needs fixing up in a few other
places.
On Sun, Feb 26, 2006 at 12:06:17AM +0000, Roger Leigh wrote:
Another pointer: the code in mathinline.h needs to match the
prototypes generated by __MATHCALL in mathcalls.h (defined in
/usr/include/math.h).
I'm not sure why there's such a mismatch. Perhaps mathinline.h can
reuse some of the __MATHDECL* macros to prevent the differences?
OK. Attached is:
- A minimal testcase (test.cc and Makefile)
Summary: The prototypes in mathcalls.h and mathinline.h mismatch due
to __THROW being removed from the mathinline.h header.
The bug occurs when a combination of these occur:
+ -O2 is used (defines __OPTIMIZE__, causing mathinline.h to be
included.
+ _GNU_SOURCE, _SVID_SOURCE or _BSD_SOURCE are defined, causing
__USE_MISC to be defined, causing mathcalls.h to be included.
+ -pedantic is used, causing the mismatch to be a fatal error.
- A simple patch (mathinline.h.fixed.patch); this reverts the __THROW
removal.
- A smaller, better patch (mathinline.h.fixed2.patch) which fixes the
macros rather than where the macros are used. This is cleaner than
the other patch. Please could you apply this one?