blob: 233bd9dfbc41c26893d2a092cdc098971f0e786d [file] [log] [blame]
Elijah Newren85e4f762025-03-19 16:22:57 +00001#!/bin/sh
2
3make CHECK_ASSERTION_SIDE_EFFECTS=1 >compiler_output 2>compiler_error
4if test $? != 0
5then
6 echo >&2 "ERROR: The compiler could not verify the following assert()"
7 echo >&2 " calls are free of side-effects. Please replace with"
8 echo >&2 " ASSERT() calls."
9 grep undefined.reference.to..not_supposed_to_survive compiler_error |
10 sed -e s/:[^:]*$// | sort | uniq | tr ':' ' ' |
11 while read f l
12 do
13 printf "${f}:${l}\n "
14 awk -v start="$l" 'NR >= start { print; if (/\);/) exit }' $f
15 done
16 exit 1
17fi
18rm compiler_output compiler_error