[PD-dev] sys_externlist declared in two places

Miller Puckette mpuckett at imusic1.ucsd.edu
Mon Dec 18 07:20:46 CET 2006


It's a mistake... I think the one in s_main.c should go.  C code since
the 70s (at least) has allowed duplicate definitions of uninitialzed
data, but everyone knows it's wrong :)

M

On Sun, Dec 17, 2006 at 07:39:48PM -0500, Hans-Christoph Steiner wrote:
> 
> Correct me if I am wrote, but shouldn't sys_externlist be only  
> declared in one .c file?  Its declared like this in s_stuff.h:
> 
> (line 24) extern t_namelist *sys_externlist;
> 
> Then like this is s_path.c:
> 
> (line 33) t_namelist *sys_externlist;
> 
> And a duplicate in s_main.c:
> 
> (line 48) t_namelist *sys_externlist;
> 
> Both s_path.c and s_main.c include s_stuff.h and they are ultimately  
> linked into the same binary, so that means that they are duplicates.   
> I am surprised that the linker only sometimes complains about this.
> 
> .hc
> 
> ------------------------------------------------------------------------
> 
> Computer science is no more related to the computer than astronomy is  
> related to the telescope.      -Edsger Dykstra
> 
> 
> 
> _______________________________________________
> PD-dev mailing list
> PD-dev at iem.at
> http://lists.puredata.info/listinfo/pd-dev




More information about the Pd-dev mailing list