gcc -Wall aktiverer alle kompilatorens advarsler. Dette alternativet bør alltid brukes for å generere bedre kode.
$ gcc -Wall [options] [source files] [object files] [-o output file]
Skriv kildefilen myfile.c :
// myfile.c
		#include <stdio.h/
		int main()
		{
		    printf("Program run!\n");
		    int i=10;
		}
Regelmessig build av myfile.c gir ingen meldinger:
$ gcc myfile.c -o myfile
		$
Bygg av myfile.c med -Wall:
$ gcc -Wall myfile.c -o myfile
		myfile.c In function 'main':
		myfile.c:6:6: warning: unused variable 'i'
		myfile.c:7:1: warning: control reaches end of non-void function
		$