%% Dominik Vogt <fvwm-workers@fvwm.org> writes:

  dv> When I compiled with "-Wall -Werror -g" I got no warnings at all,
  dv> but with "-Wall -Werror -g -O2" it worked fine.

Some kinds of warnings are not found unless you compile with
optimization.  Enabling the optimizer allows the compiler to look much
more deeply at your code, and that can enable it to discover problems
that can't be found by a simple one-pass compilation.

The most common such warnings are for unused variable: without
optimization on the compiler doesn't know enough about your code to
realize that a variable is never used; only with optimization turned on
will it keep enough state throughout the function to deliver that
warning.

Note that the level of optimization doesn't matter; even -O is good
enough to find the extra warnings (but -O2 is the most common, and so
best-tested, level of optimization in GCC).


FYI.  BTW, all of the above applies to GCC only; other compilers
obviously may have different behavior.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]> HASMAT--HA Software Mthds & Tools
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to