Penguin

Differences between current version and revision by previous author of -Wall.

Other diffs: Previous Major Revision, Previous Revision, or view the Annotated Edit History

Newer page: version 8 Last edited on Friday, September 18, 2009 8:31:46 am by SpellingMan
Older page: version 7 Last edited on Friday, October 31, 2003 10:21:51 am by StuartYeates Revert
@@ -1,9 +1,9 @@
 When running [gcc(1)], [-Wall] is the [CommandLine] option that enables all warnings. Generally the first thing people will look for when debugging or helping others with [C]/[C++] code is that it compiles with [-Wall]. 
  
-[-Wall] warns about a great many things which are normally harmless in normal circumstances but can be dangerous at others. __-pedantic__ also warns against things that are technically wrong but cannot lead to problems for [gcc(1)] and __-pedantic-errors__ issues errors for such quibbles. __-pedantic__ and __-pedantic-errors__ are not usually used unless the code is being written with the intention of porting it to exotic hardware, as a last ditch attempt to find an illusive bug or as a method of evaluating the quality of code (StuartYeates always uses these flags when marking [C]/[C++] assignments). 
+[-Wall] warns about a great many things which are normally harmless in normal circumstances but can be dangerous at others. __-pedantic__ also warns against things that are technically wrong but cannot lead to problems for [gcc(1)] and __-pedantic-errors__ issues errors for such quibbles. __-pedantic__ and __-pedantic-errors__ are not usually used unless the code is being written with the intention of porting it to exotic hardware, as a last ditch attempt to find an elusive bug or as a method of evaluating the quality of code (StuartYeates always uses these flags when marking [C]/[C++] assignments). 
  
 It is often a good idea to add [-Wall] to your __CFLAGS__ environment variable. The second thing to do after adding [-Wall] is to add __-g__ so you can get debugging symbols when your program crashes. Unlike [-Wall], __-g__ can effect the RunTime performance of the generated programs so is not recommended when building core system components on a production system. 
  
 Many programmers have a line similar to 
  export CFLAGS="-Wall -g" 
 in their __.profile__.