public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix assert.h
@ 2003-08-15 15:53 Jakub Jelinek
  2003-08-15 17:55 ` Ulrich Drepper
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2003-08-15 15:53 UTC (permalink / raw)
  To: Ulrich Drepper, Roland McGrath; +Cc: Glibc hackers

Hi!

One more thing about assert.h:

2003-08-15  Jakub Jelinek  <jakub@redhat.com>

	* assert/assert.h (assert_perror): Use __builtin_expect for gcc >=
	3.0, not for !gcc or gcc < 3.0.

--- libc/assert/assert.h.jj	2003-08-15 08:38:52.000000000 -0400
+++ libc/assert/assert.h	2003-08-15 11:35:16.000000000 -0400
@@ -102,12 +102,12 @@ __END_DECLS
 # ifdef	__USE_GNU
 #  if __GNUC_PREREQ (3, 0)
 #   define assert_perror(errnum) \
-  (__ASSERT_VOID_CAST (!(errnum) ? 0 :					      \
+  (__ASSERT_VOID_CAST (__builtin_expect (!(errnum), 1) ? 0 :		      \
 		       (__assert_perror_fail ((errnum), __FILE__, __LINE__,   \
 					      __ASSERT_FUNCTION), 0)))
 #  else
 #   define assert_perror(errnum) \
-  (__ASSERT_VOID_CAST (__builtin_expect (!(errnum), 1) ? 0 :		      \
+  (__ASSERT_VOID_CAST (!(errnum) ? 0 :					      \
 		       (__assert_perror_fail ((errnum), __FILE__, __LINE__,   \
 					      __ASSERT_FUNCTION), 0)))
 #  endif

	Jakub

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix assert.h
  2003-08-15 15:53 [PATCH] Fix assert.h Jakub Jelinek
@ 2003-08-15 17:55 ` Ulrich Drepper
  0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Drepper @ 2003-08-15 17:55 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Roland McGrath, Glibc hackers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jakub Jelinek wrote:

> 2003-08-15  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* assert/assert.h (assert_perror): Use __builtin_expect for gcc >=
> 	3.0, not for !gcc or gcc < 3.0.

Applied.

- -- 
- --------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE/PR5a2ijCOnn/RHQRApoZAJ45JbnOOycLTHdBgnfTQQbClSGPmACdH8CN
jlHmwkqSwAXCF35VmHr+W4o=
=uFOS
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-08-15 17:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-15 15:53 [PATCH] Fix assert.h Jakub Jelinek
2003-08-15 17:55 ` Ulrich Drepper

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