[Coin-discuss] OsiCuts warnings
Stefan Vigerske
stefan at vigerske.de
Sun Nov 16 13:47:49 EST 2008
Hi,
> Just my generic 2c: In between degrees I worked for a financial
> software company. They required us to compile every project with
> "Treat Warnings as Errors". When I started I though that was silly,
> but over time I found that it was very valuable. It tends to promote
> good readable code and reduce the number of really difficult to squash
> bugs.
I can add some cents too:
I don't know about the visual studio or cl build, but for the gcc builds
the default is to compile with --pedantic-errors (except on mac, where
some system header files might fail to compile). This already turns many
warnings into errors.
Those that are left as warnings are probably really minor issues.
Since compiler warnings are not standardized, every compiler generates
different sets of warnings. Thus, even though a developer normally
eleminates all warnings that his/her compiler generates, a different
compiler might find something else to warn about. This is especially the
case when people use MS or Intel compilers which I believe are not much
popular around developers. E.g., Intel generates a lot of warnings like
overloaded virtual function "OsiSolverInterface::readMps" is only
partially overridden in class "Bonmin::OsiTMINLPInterface"
Taking them serious (i.e., as errors) would make almost all coin project
not compiling anymore, I guess.
Normally, in the BSP we try to fix compiler warnings. However, building
the OS/trunk with all its dependencies and intel compiler gives me 500KB
of compiler warnings...
Best,
Stefan
More information about the Coin-discuss
mailing list