File: gcc-Wall

package info (click to toggle)
rxvt 1%3A2.4.5-16
  • links: PTS
  • area: main
  • in suites: slink
  • size: 1,128 kB
  • ctags: 1,296
  • sloc: ansic: 12,852; makefile: 521; sh: 411
file content (40 lines) | stat: -rwxr-xr-x 739 bytes parent folder | download | duplicates (38)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh
# gcc -Wall plus other important warnings not included in -Wall

for arg
do
    case $arg in
	-O*) Wuninitialized=-Wuninitialized;;  # only makes sense with `-O'
    esac
done

exec gcc \
	-Wall $Wuninitialized \
	-Wwrite-strings \
	-Wcast-qual \
	-Wbad-function-cast \
	-Wpointer-arith \
	-Wstrict-prototypes \
	-Wmissing-prototypes \
	-Wmissing-declarations \
	-Wnested-externs \
	-Wtraditional \
	-Wconversion \
	-Wcomment \
	-Wcast-align \
	-Winline \
	-Wshadow \
	-Wredundant-decls \
	-Wid-clash-31 \
	"$@"

#    -Wall implies:
#	-Wimplicit
#	-Wreturn-type
#	-Wunused
#	-Wswitch
#	-Wformat
#	-Wchar-subscripts
#	-Wparentheses
#	-Wmissing-braces
------------------------------------------------------------------------------