For the simple program, forward.c:
#include stdio.h
typedef struct _item_st {
int data;
struct item_st *next;
} item_t;
int
main (int argc, char *argv[])
{
item_t head = {0, NULL};
head.data = 1;
printf (head.data: %d ptr: %p\n, head.data, (void *)head.next);
return 0;
Qun-Ying zhu.quny...@gmail.com writes:
No warning at all. Should gcc warn about the *next pointer points to
an unknown structure? I know it is allow by the standard, but most of
the case, it indicates some error in the code.
Hmm? Where do you expect to warn?
You never dereference the
This question is not appropriate on this mailing list, questions about
using GCC should be sent to the gcc-h...@gcc.gnu.org list, please take
any follow up there instead, thanks.
On 29 April 2012 07:14, Qun-Ying wrote:
No warning at all. Should gcc warn about the *next pointer points to
an