lkml.org 
[lkml]   [2001]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [reiserfs-list] Re: ReiserFS Oops (2.4.1, deterministic, symlink
On Fri, 2 Feb 2001, Jakub Jelinek wrote:

> You can do:
> if [ "$CC" = gcc ]; then
> echo 'inline void f(unsigned int n){int i,j=-1;for(i=0;i<10&&j<0;i++)if((1UL<<i)==n)j=i;if(j<0)exit(0);}main(){f(64);exit(1);}' > test.c
> gcc -O2 -o test test.c
> if ./test; then echo "*** Please don't use this compiler to compile kernel"; fi
> rm -f test.c test
> fi
>
> (the $CC = gcc test is there e.g. so that the test is not done when
> cross-compiling or when there is a separate kernel compiler and userland
> compiler (e.g. on sparc64). This test will barf on gcc-2.96 up to -67 and
>
> Jakub

ehhmm..

[root@fogarty /tmp]# rpm -q gcc
gcc-2.96-70
[root@fogarty /tmp]# cat test.c
inline void f(unsigned int n){int
i,j=-1;for(i=0;i<10&&j<0;i++)if((1UL<<i)==n)j=i;if(j<0)exit(0);}main(){f(64);
exit(1);}
[root@fogarty /tmp]# gcc -o test test.c
[root@fogarty /tmp]# ./test

didn't barf here with 2.96-70.

regards,
--
Paul Jakma paul@clubi.ie paul@jakma.org
PGP5 key: http://www.clubi.ie/jakma/publickey.txt
-------------------------------------------
Fortune:
One person's error is another person's data.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:52    [W:0.089 / U:0.052 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site