[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#340871: [m68k] Toolchain regression in mathinline.h (glibc)



Stephen R Marenka <stephen@marenka.net> writes:

> On Tue, Feb 21, 2006 at 07:12:09PM +0000, Roger Leigh wrote:
>
>> There is a problem with compiling C++ code using mathinline.h.  The
>> inline function signatures do not match the prototypes in
>> mathcalls.h.  The prototypes in mathcalls.h include a throw specifier
>> (AFAICT from __MATHCALL), but the functions in mathinline.h lack this,
>> leading to build failures:
>
> [...]
>
>> I'm not familiar with glibc/m68k, but adding __THROW to the inline
>> functions should be all that is required.
>
> It's just not clear to me where this is supposed to go. I stuck
> mathinline.h at <http://people.debian.org/~smarenka/bugs/mathinline.h>.
>
> I'd be happy to test the results if you could give me some pointers.

It might be as simple as:

--- 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
 
 /* Define the three variants of a math function that has a direct
    implementation in the m68k fpu.  FUNC is the name for C (which will be


Basically, you need to add __THROW after the function prototype.
Following all the #defines backwards:

__inline_mathop(atan, atan)
__inline_mathop1(double, func, op)
__m81_defun (float_type, func, (float_type __mathop_x))

leads us to the real prototype being expanded in __m81_defun.  I think
this is the right place, but I'm not completely certain.


Regards,
Roger

-- 
Roger Leigh
                Printing on GNU/Linux?  http://gutenprint.sourceforge.net/
                Debian GNU/Linux        http://www.debian.org/
                GPG Public Key: 0x25BFB848.  Please sign and encrypt your mail.

Attachment: pgpLmktaZDe0l.pgp
Description: PGP signature


Reply to: