Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cuae2!ihnp4!chinet!nucsrl!ram From: ram@nucsrl.UUCP Newsgroups: comp.lang.c Subject: Long Branches Message-ID: <3950006@nucsrl.UUCP> Date: Sat, 17-Jan-87 06:11:46 EST Article-I.D.: nucsrl.3950006 Posted: Sat Jan 17 06:11:46 1987 Date-Received: Mon, 19-Jan-87 01:55:00 EST Organization: Northwestern Univ., Evanston IL Lines: 49 I have a problem in using the C compiler and VAX assembler in our local 4.3BSD(VAX) site. I have a program which has a huge(>900lines) case statement. /* Whoever said that programmers(pro) don't use case/switch */ The assembler chokes on (>32K long) long branches. Apparently there is a flag "-J" for such purposes (in the assembler) which does not seem to work. The man page for "as" lists under Bugs --------------- BUGS -J should be eliminated; the assembler should automatically choose among byte, word and long branches. _______________ That does not seem to work either. The ouput of the C compiler was ___________________________ Assembler: "/tmp/ctm088343", line 2565: brw: Branch too far(50148b): try -J flag "/tmp/ctm088343", line 2823: brw: Branch too far(48806b): try -J flag "/tmp/ctm088343", line 2922: brw: Branch too far(48313b): try -J flag "/tmp/ctm088343", line 12658: Case will branch too far "/tmp/ctm088343", line 12659: Case will branch too far "/tmp/ctm088343", line 12664: Case will branch too far __________________________ and the ouput of a seperate assembly had the same error message(predictably). Assembler: "prolog.s", line 13337: Case will branch too far "prolog.s", line 13338: Case will branch too far "prolog.s", line 13339: Case will branch too far "prolog.s", line 13340: Case will branch too far This piece of code did compile in a Gould machine but not on the Vax (Code is portable). Could somebody explain and help me solve this problem. Renu Raman ...ihnp4!nucsrl!ram Northwestern Univ. Comp. Sci. Lab. Evanston IL 60201