Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!mcsun!ukc!inmos!miranda!bob From: bob@miranda.inmos.co.uk (Bob Green) Newsgroups: comp.os.minix Subject: Re: c68 bug... Message-ID: <15108@ganymede.inmos.co.uk> Date: 28 Mar 91 08:37:33 GMT References: <48408@nigel.ee.udel.edu> Sender: news@inmos.co.uk Organization: INMOS Limited, Bristol, UK Lines: 44 In article <48408@nigel.ee.udel.edu>, lalonde@torolab2.vnet.ibm.com (Glen Lalonde) writes: |> I was converting all sizeof() to (int)sizeof(), so I could compile with |> gcc, when I noticed a c68 bug. |> |> Try this: |> main() { int a,b; |> long buf[32/sizeof(long)]; |> long buf2[32/((int)sizeof(long))]; |> |> a = sizeof(buf); |> b = sizeof(buf2); |> printf("a is %d, b is %d\n", a,b); } |> |> Gcc and ack give 32,32. c68 gives 32 and 16. |> This bug caused my machine to crash, also there must be few more bugs in |> c68 since I get read errors about once every half an hour if I use a |> c68 compiled kernel. You are quite right - the code you include does seem to produce the wrong answer with c68. However I feel that I must point something out to you. It does not seem fair to say "because I've found one thing wrong with c68, then I can blame all of my other problems on it". Believe it or not there could be some other cause of your kernel problem. Perhaps c68 generates faster code, and finds a timing problem in the kernel that slow old ACK doesn't. I'm not saying that is your problem, just that there could be many reasons that you're having trouble. I've been using c68 for a long time now, and used it to successfully port Minix to a home-brew 68000 box. I've NEVER had a read error (that I know of). I have of course rewritten the disk tasks to talk to my hardware, so perhaps the problem you mention is in there. A long time ago I mailed CvW how much I liked c68. But now I must stand up publically and thank him for all the work he has put in (and continues to put in) to c68/386. I think its a great compiler and the Minix community would be worse off without it. Thanks for listening to my rant (did you have a choice) ;-) -Bob -- | Bob Green Inmos Ltd, Bristol | EMail(UK) ukc!inmos!bob |---------------------------------------| or bob@inmos.co.uk |The opinions above are my personal | Internet: bob@inmos.com |views and do not reflect Inmos policy. | UUCP:(US) uunet!inmos.com!bob