[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(main_buf = *main_buf_p) is not syntacticly like (i = *j) ?
- To: linux-il(at-nospam)linux.org.il
- Subject: (main_buf = *main_buf_p) is not syntacticly like (i = *j) ?
- From: Shaul Karl <shaulka(at-nospam)bezeqint.net>
- Date: Mon, 02 Jul 2001 15:00:21 +0300
- Delivered-To: linux.org.il-linux-il@linux.org.il
- Sender: linux-il-bounce(at-nospam)cs.huji.ac.il
I have two 11 lines C programs which are supposed to be syntacticly similar.
Yet int_test.c get compiled while the other does not:
Script started on Mon Jul 2 14:51:10 2001
[14:51:10 tmp]$ more *_test.c
::::::::::::::
int_test.c
::::::::::::::
#include <setjmp.h>
int main()
{
int i;
int *j = &i;
i = *j;
return 0;
}
::::::::::::::
jmp_test.c
::::::::::::::
#include <setjmp.h>
int main()
{
jmp_buf test_env;
jmp_buf *test_env_p = &test_env;
test_env = *test_env_p;
return 0;
}
[14:51:25 tmp]$ cc -Wall -c int_test.c
[14:51:47 tmp]$ cc -Wall -c jmp_test.c
jmp_test.c: In function `main':
jmp_test.c:9: incompatible types in assignment
[14:51:56 tmp]$ exit
exit
Script done on Mon Jul 2 14:52:02 2001
What did I miss?
--
Shaul Karl <shaulka@bezeqint.net>
Hillel used to say: If I am not for myself who will be for me?
Yet, if I am for myself only, what am I? And if not now, when?
(Ethics Of The Fathers 1:14)
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il