summaryrefslogtreecommitdiff
path: root/c99
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2017-06-09 12:42:08 +0300
committerIgor Pashev <pashev.igor@gmail.com>2017-06-09 12:42:08 +0300
commit781434cd4f3b1be60b117ae61babaf60f4a9e563 (patch)
tree092486dd2ad6dc75d28590f63357eb64790eafb5 /c99
downloadgcc-defaults-781434cd4f3b1be60b117ae61babaf60f4a9e563.tar.gz
Imported 1.168debian/1.168
Diffstat (limited to 'c99')
-rw-r--r--c9924
1 files changed, 24 insertions, 0 deletions
diff --git a/c99 b/c99
new file mode 100644
index 0000000..046d30b
--- /dev/null
+++ b/c99
@@ -0,0 +1,24 @@
+#! /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+"$@"}