public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* What should __sync_bool_compare_and_swap be on ia64?
@ 2003-04-04 19:42 H. J. Lu
  0 siblings, 0 replies; only message in thread
From: H. J. Lu @ 2003-04-04 19:42 UTC (permalink / raw)
  To: gcc

I got

# cat x.c
#include <ia64intrin.h>
 
int
foo (long **x, long *i)
{
  return __sync_bool_compare_and_swap (x, 0L, i);
}
# gcc -Wall x.c -c 
x.c: In function `foo':
x.c:6: warning: cast from pointer to integer of different size
x.c:6: warning: cast to pointer from integer of different size
x.c:6: warning: return makes integer from pointer without a cast

I have 2 questions:

1. According to my ia64 psABI, __sync_bool_compare_and_swap should
return int. But gcc's version doesn't.
2. Why do I got warnings about casting of different size?


H.J.

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

only message in thread, other threads:[~2003-04-04 19:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-04 19:42 What should __sync_bool_compare_and_swap be on ia64? H. J. Lu

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