#!/bin/sh
set -ex

if [ -z "$CC" ]; then
    CC="gcc"
fi

SRCLANG=c
MACROLIST=macro-list.txt
CCDEFS=cc-definitions.txt
CLANGDEFS=clang-definitions.txt

# Gather list of macros as "NAME" = NAME.
$CC -dM -E -x $SRCLANG /dev/null -o - | \
grep "#define" | sort -f | sed -e "s/#define \([^ ]*\) .*/\"\1\" = \1/" > $MACROLIST

$CC -E -x $SRCLANG $MACROLIST > $CCDEFS

clang -E -x $SRCLANG $MACROLIST > $CLANGDEFS

diff $CCDEFS $CLANGDEFS



Add script for checking builtin macros verse another compiler ($CC or gcc).
Add script for checking builtin macros verse another compiler ($CC or
gcc).


git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@57133 91177308-0d34-0410-b5e6-96231b3b80d8
