From: Matt H. <ma...@cs...> - 2005-08-03 01:45:05
|
> -----Original Message----- > From: cil...@li... > [mailto:cil...@li...] On Behalf Of > Benjamin Monate > Sent: Wednesday, July 27, 2005 6:26 AM > To: cil...@li... > Subject: [CIL users] Spurious warning in Mergecil > > Dear CIl users, > > While merging > === g1.c === > extern int x = 77; > ============ > and > === g2.c === > int x; > ============ > I get the warning : > Warning: global var G at tests/misc/g1.c:1 has different > initializer than > tests/misc/g2.c:1 > > The warning is clearly not correct. gcc would have emitted a > warning while compiling g1.c. > > The linker ld links these files and assumes x is global and > initialized with 77. Would it be correct to simply ignore the "extern" storage of any variable with an initializer? -- Matt |