PageRenderTime 22ms CodeModel.GetById 19ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/alternatives/c89

http://github.com/brinkman83/bashrc
Shell | 23 lines | 13 code | 4 blank | 6 comment | 1 complexity | ddef29c39d1a5d5ac6a5380627309ad5 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-2.95):
 5# 	-ansi
 6# 	-std=c89
 7# 	-std=iso9899:1990
 8
 9extra_flag=-std=c89
10
11for i; do
12    case "$i" in
13	-ansi|-std=c89|-std=iso9899:1990)
14	    extra_flag=
15	    ;;
16	-std=*)
17	    echo >&2 "`basename $0` called with non ANSI/ISO C option $i"
18	    exit 1
19	    ;;
20    esac
21done
22
23exec gcc $extra_flag ${1+"$@"}