Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!husc6!cca!mirror!rayssd!brunix!csvx002!ajg From: ajg@csvx002.UUCP Newsgroups: comp.lang.c++ Subject: Porting v1.2 to Encore Multimax Message-ID: <15830@brunix.UUCP> Date: Tue, 26-May-87 21:42:46 EDT Article-I.D.: brunix.15830 Posted: Tue May 26 21:42:46 1987 Date-Received: Fri, 29-May-87 01:02:06 EDT Sender: root@brunix.UUCP Reply-To: ajg@brunix.UUCP (Alan J. Gebele) Organization: Brown University Computer Science Dept. Lines: 44 Keywords: compiler problems I am currently trying to port version 1.2 of C++ to an Encore Multimax running UMAX 4.2. The Encore's C compiler will not accept switch statments whose case labels are not all in the same block (as in example below). (According the Umax manual, this is an anomaly found only in Portable C). The cfront program outputs code like this in some occurrences of switch statements in the c++ source (this occurs repeatedly in the compiler source). Does anyone know of a fix which either fixes the compiler source so this does not occur or post processor which takes these unbalanced blocks out? Any information would be appreciated. -------------- example ---------------- /* this is short example of the problem */ main() { int i ; for (i=1; i<4; i++) switch(i) { case 1 : { int i = 1 ; printf("%d", i); break ; /* } should be here */ case 2 : printf("2"); break ; case 3 : printf("3"); break ; } /* this should be above */ } ; } ------------- end of example ---------- Thanks, Alan J. Gebele {ihnp4,decvax,allegra}!brunix!ajg ajg%cs.brown.edu@relay.cs.net-relay.ARPA ajg@cs.brown.edu.CSNET