Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Under VAX/VMS bug in gas adding extern refs

16 views
Skip to first unread message

Tim Berners-Lee

unread,
Dec 1, 1989, 10:26:57 AM12/1/89
to
/* The following bug shows up under VAX/VMS in GAS, the gnu assembler.
** (Release of GCC = 1.35 or 1.36). The error message produced is:
**
**
** FATAL:Case value 6 unexpected at line 659 of file "vax.c"
**
** Replacing the + below with a - avoids the problem.
**
*/

main() { extern int x, y; exit((int)&x + (int)&y); }

/* (A strange thing to want to do, I agree!) */

/*_______________________________________________________________

The assembler generated is as follows:

#NO_APP
gcc_compiled.:
.comm _x,0
.comm _y,0
.text
.align 1
.globl _main
_main:
.word 0x0
jsb _c$main_args
movab _x+_y,r0
movl r0,_z
ret
.comm _z,4

_______________________________________________________________________
Tim Berners-Lee
CERN (European Particle Physics Laboratory), 1211 Geneva 23, Switzerland
t...@online.cern.ch
*/

0 new messages