public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix math.h for C++ with -mlong-double-64
@ 2006-02-02 18:59 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2006-02-02 18:59 UTC (permalink / raw)
  To: Roland McGrath; +Cc: Glibc hackers

Hi!

C++ has strict rules where it wants to see throw ().

2006-02-02  Jakub Jelinek  <jakub@redhat.com>

	* math/math.h (__nldbl_nexttowardf): Put __THROW before
	__attribute__ ((__const__)).
	(__MATHDECL_2): Use __REDIRECT_NTH instead of __REDIRECT
	followed by __THROW.

--- libc/math/math.h	2006-02-02 05:23:04.000000000 -0500
+++ libc/math/math.h	2006-02-02 13:54:37.000000000 -0500
@@ -103,7 +103,7 @@ __BEGIN_DECLS
 
 #   ifdef __USE_ISOC99 
 extern float __nldbl_nexttowardf (float __x, long double __y)
-				  __attribute__ ((__const__)) __THROW;
+				  __THROW __attribute__ ((__const__));
 #    ifdef __REDIRECT_NTH
 extern float __REDIRECT_NTH (nexttowardf, (float __x, long double __y),
 			     __nldbl_nexttowardf)
@@ -118,8 +118,8 @@ extern double __REDIRECT_NTH (nexttoward
 
 #   undef __MATHDECL_1
 #   define __MATHDECL_2(type, function,suffix, args, alias) \
-  extern type __REDIRECT(__MATH_PRECNAME(function,suffix), \
-			 args, alias) __THROW
+  extern type __REDIRECT_NTH(__MATH_PRECNAME(function,suffix), \
+			     args, alias)
 #   define __MATHDECL_1(type, function,suffix, args) \
   __MATHDECL_2(type, function,suffix, args, __CONCAT(function,suffix))
 #  endif

	Jakub

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-02-02 18:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-02 18:59 [PATCH] Fix math.h for C++ with -mlong-double-64 Jakub Jelinek

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).