Differences between version 6 and previous revision of -Wall.
Other diffs: Previous Major Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 6 | Last edited on Sunday, August 24, 2003 8:23:19 am | by AristotlePagaltzis | Revert |
Older page: | version 1 | Last edited on Saturday, August 23, 2003 6:10:52 pm | by StuartYeates | Revert |
@@ -1,3 +1,9 @@
-When running [gcc(1)], [-Wall] is the [CommandLine] option that maximises
warnings Generally the first thing that
people look for when debugging or helping others with [C]/[C++] code it
that it is compiling
with [-Wall].
+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 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.
+[-Wall] warns about a great many things which are normally harmless in normal circumstances but can be dangerous at others. __
-pedantic__
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.
+
+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.
+
+Many programmers have a line similar to
+ export CFLAGS="-Wall -g"
+in their __.profile__
.