Article View: gnu.gcc.bug
Article #2728sun4-os4/gcc-1.35 -g and ({...}) give undefined compiler generated externals
From: Jim Meyering
Date: Mon, 05 Jun 1989 19:18
Date: Mon, 05 Jun 1989 19:18
38 lines
1563 bytes
1563 bytes
/*
* 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
Technical Details
Message-ID:
<8906051918.AA19828@ai.cs.utexas.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!CS.UTEXAS.EDU!meyeringShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!CS.UTEXAS.EDU!meyering
From: meyering@CS.UTEXAS.EDU (Jim Meyering)
Newsgroups: gnu.gcc.bug
Subject: sun4-os4/gcc-1.35 -g and ({...}) give undefined compiler generated externals
Message-ID: <8906051918.AA19828@ai.cs.utexas.edu>
Date: 5 Jun 89 19:18:34 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: UofTX @ Austin CS Department
Lines: 38