/alternatives/c89
http://github.com/brinkman83/bashrc · Shell · 23 lines · 13 code · 4 blank · 6 comment · 1 complexity · ddef29c39d1a5d5ac6a5380627309ad5 MD5 · raw file
- #! /bin/sh
- # Call the appropriate C compiler with options to accept ANSI/ISO C
- # The following options are the same (as of gcc-2.95):
- # -ansi
- # -std=c89
- # -std=iso9899:1990
- extra_flag=-std=c89
- for i; do
- case "$i" in
- -ansi|-std=c89|-std=iso9899:1990)
- extra_flag=
- ;;
- -std=*)
- echo >&2 "`basename $0` called with non ANSI/ISO C option $i"
- exit 1
- ;;
- esac
- done
- exec gcc $extra_flag ${1+"$@"}