Path: utzoo!telly!attcan!uunet!tut.cis.ohio-state.edu!CISCO.COM!satz From: satz@CISCO.COM Newsgroups: gnu.gcc.bug Subject: Wrong line numbers reported on structure initializations Message-ID: <8902140848.AA27120@prep.ai.mit.edu> Date: 14 Feb 89 09:08:14 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 25 The following program when compiled on a Sun 3/280 OS 3.5 using gcc 1.33 produces warnings with the wrong line numbers reported for components of an initialized structure. This makes fixing the problem almost impossible. ------------------------------ struct list { struct list *next; char *a; } foo[] = { { 0, "" }, { 1, "" }, { 2, "" }, { 3, "" }, }; ------------------------------ gcc -W -c -v -B$g/ foo.c gcc version 1.32 /usr.MC68020/dustbin/src/gnu/gcc-1.33/cpp -v -undef -D__GNUC__ -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__HAVE_68881__ -Dmc68020 foo.c /tmp/cca00424.cpp GNU CPP version 1.33 /usr.MC68020/dustbin/src/gnu/gcc-1.33/cc1 /tmp/cca00424.cpp -quiet -dumpbase foo.c -W -version -o /tmp/cca00424.s GNU C version 1.33 (68k, MIT syntax) compiled by GNU C version 1.33. foo.c:9: warning: initialization of pointer from integer lacks a cast foo.c:9: warning: initialization of pointer from integer lacks a cast foo.c:9: warning: initialization of pointer from integer lacks a cast