[oberoi]>gcc temp.c
temp.c: In function `main':
temp.c:7: warning: initialization from incompatible pointer type
arch : sparc SUNW,Ultra-250
[oberoi]>cat temp.c
#include<stdio.h>
char x [5] = { 0xf0, 0x0f, 0xc7, 0xc8 };
main ()
{
void (*f)() = x;
f();
}
compiled with one warning
[oberoi]>a.out
Segmentation Fault (core dumped)
i got this on running .
and by gdb
[oberoi]>gdba.out
GDB is free software and you are welcome to distribute copies of it
under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.16.1-96q4 (sparc-sun-solaris2),
Copyright 1996 Free Software Foundation, Inc...(no debugging symbols
found)...
(gdb) r
Starting program: a.out
warning: Unable to find dynamic linker breakpoint function.
warning: GDB will be unable to debug shared library initializers
warning: and track explicitly loaded dynamic code.
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x20428 in x ()
(gdb)
got it from gdb.
sorry guys i do not have intel platform right now.
i will catch you later around 1:00 clock,
have to go somewhere.
-gaurav.
--
_
|^|^| -^- Love to Linux
\-/ G A U R A V |
mailto:[EMAIL PROTECTED] / mailto:[EMAIL PROTECTED]
| Sea/She is nature's art/\/ Everybody likes to get the feel of it
|-=-----------------------/-----------------------------------------|
|_|f I can I m a g i n/e it I can A c h i e v e it_._.-.-._.|
-----------------------------------------------------------------------
For information on this and other Linux India mailing lists check out
http://lists.linux-india.org/