Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

GCC Flags

Name: Anonymous 2009-06-12 11:30

What's your favourite GCC flag?

Name: Anonymous 2009-06-13 14:14

`-W'  This is a general option similar to `-Wall' which warns about a
      selection of common programming errors, such as functions which
      can return without a value (also known as ``falling off the end of
      the function body''), and comparisons between signed and unsigned
      values. For example, the following function tests whether an un-
      signed integer is negative (which is impossible, of course):
          int
          foo (unsigned int x)
          {
            if (x < 0)
              return 0; /* cannot occur */
            else
              return 1;
          }
      Compiling this function with `-Wall' does not produce a warning...
1

1. Gough, Brian. An Introduction to GCC.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List