Re: static and forward declaration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



CodeWarrior is correct in its message. The variables are being defined the
first time for use in the procedural_db_register() calls and then later
they are defined again but this time with initial values. Does CodeWarrior
issue the redefinition message as a warning or as an error?

The output from 'gcc -v' on my machine is:
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)

Even though -Wall is specified, gcc accepts it without even a warning. I
don't know offhand if this behaviour is allowed by the standard. My
personal coding style would put the declaration with initial values before
the first use which would eliminate the two lines at the top of the file.


[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux