PageRenderTime 140ms CodeModel.GetById 105ms app.highlight 1ms RepoModel.GetById 34ms app.codeStats 0ms

/alternatives/c99

http://github.com/brinkman83/bashrc
Shell | 24 lines | 13 code | 4 blank | 7 comment | 1 complexity | aa80579d73b66c41e169b80f5fbc9324 MD5 | raw file
 1#! /bin/sh
 2
 3# Call the appropriate C compiler with options to accept ANSI/ISO C
 4# The following options are the same (as of gcc-3.3):
 5# 	-std=c99
 6# 	-std=c9x
 7# 	-std=iso9899:1999
 8# 	-std=iso9899:199x
 9
10extra_flag=-std=c99
11
12for i; do
13    case "$i" in
14	-std=c9[9x]|-std=iso9899:199[9x])
15	    extra_flag=
16	    ;;
17	-std=*|-ansi)
18	    echo >&2 "`basename $0` called with non ISO C99 option $i"
19	    exit 1
20	    ;;
21    esac
22done
23
24exec gcc $extra_flag ${1+"$@"}