meyering@CS.UTEXAS.EDU (Jim Meyering) (06/06/89)
/* * To reproduce: use -g option and nested ({...})-`block expressions' * Configuration: gcc-1.35/sun4-os4 with rms' loop.c virtual memory fix * Symptom: loader complains of undefined compiler generated externals * * % gcc -v -g m.c * gcc version 1.35 * /p/lib/gcc-cpp -v -undef -D__GNUC__ -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ m.c /tmp/cca19722.cpp * GNU CPP version 1.35 * /p/lib/gcc-cc1 /tmp/cca19722.cpp -quiet -dumpbase m.c -g -version -o /tmp/cca19722.s * GNU C version 1.35 (sparc) compiled by GNU C version 1.35. * as -o m.o /tmp/cca19722.s * ld -e start -dc -dp -Bstatic /lib/crt0.o m.o /p/lib/gcc-gnulib -lg -lc * Undefined: * LBE5 * LBB5 * % */ #define MAX(a,b) ({ \ __typeof(a) _a = (a); \ __typeof(b) _b = (b); \ (_a > _b) ? _a : _b; \ }) #define COPYSIGN(a,b) ({ \ __typeof(a) _a = (a); \ __typeof(b) _b = (b); \ (_b < 0) \ ? ((_a > 0) ? -(_a) : _a) \ : ((_a < 0) ? -(_a) : _a) ; \ }) void main() { int x; x = COPYSIGN(MAX(0,0),0); } -- Jim Meyering meyering@cs.utexas.edu