🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #2295

Wrong line numbers reported on structure initializations

#2295
From: satz
Date: Tue, 14 Feb 1989 09:08
25 lines
1414 bytes
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
Technical Details
Message-ID: <8902140848.AA27120@prep.ai.mit.edu>
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!uunet!tut.cis.ohio-state.edu!CISCO.COM!satz

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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