Created
September 28, 2015 13:59
-
-
Save sortie/7dbb97696ea56a1da202 to your computer and use it in GitHub Desktop.
c99
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# Call the appropriate C compiler with options to accept ANSI/ISO C | |
# The following options are the same (as of gcc-3.3): | |
# -std=c99 | |
# -std=c9x | |
# -std=iso9899:1999 | |
# -std=iso9899:199x | |
extra_flag=-std=c99 | |
for i; do | |
case "$i" in | |
-std=c9[9x]|-std=iso9899:199[9x]) | |
extra_flag= | |
;; | |
-std=*|-ansi) | |
echo >&2 "`basename $0` called with non ISO C99 option $i" | |
exit 1 | |
;; | |
esac | |
done | |
exec gcc $extra_flag ${1+"$@"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment