projects
/
libfirm
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
indentation fixed
[libfirm]
/
ir
/
be
/
test
/
fehler31.c
1
#include <stdlib.h>
2
#include <stdio.h>
3
4
static unsigned hash_ptr(const void *ptr)
5
{
6
unsigned ptr_int = ((const char*) ptr - (const char*) NULL);
7
return ptr_int >> 3;
8
}
9
10
void *p = (void*) 0xdeadbeef;
11
12
int main()
13
{
14
printf("0x%x (shoulde be 0x1bd5b7dd)\n", hash_ptr(p));
15
16
return 0;
17
}