/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. # Call the appropriate C compiler with options to accept ANSI/ISO C
  3. # The following options are the same (as of gcc-2.95):
  4. # -ansi
  5. # -std=c89
  6. # -std=iso9899:1990
  7. extra_flag=-std=c89
  8. for i; do
  9. case "$i" in
  10. -ansi|-std=c89|-std=iso9899:1990)
  11. extra_flag=
  12. ;;
  13. -std=*)
  14. echo >&2 "`basename $0` called with non ANSI/ISO C option $i"
  15. exit 1
  16. ;;
  17. esac
  18. done
  19. exec gcc $extra_flag ${1+"$@"}