#!/bin/sh
# $Id: gcc-strict,v 1.9 2018/08/11 12:41:44 tom Exp $
# originally from Fergus Henderson - fjh@munta.cs.mu.oz.au
OPTS="-O -W
-Wbad-function-cast
-Wcast-align
-Wcast-qual
-Wmissing-declarations
-Wnested-externs
-Wpointer-arith
-Wwrite-strings
-pedantic
"
VERS=`gcc --version 2>/dev/null |head -n 1 | sed -e 's/[[:space:]]*$//' -e 's/[[:space:]]\{1,\}[[:digit:]]\{8,8\}$//' -e 's/^.*[[:space:]]//'`
case x$VERS in
x[2-3].[0-9]*.[0-9][0-9]*|x[4].[0-6][0-9]*.[0-9]*)
OPTS="$OPTS -ansi"
;;
x)
gcc --version
exit 1
;;
esac
gcc-normal $OPTS "$@"