Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!rochester!cornell!uw-beaver!rice!sun-spots-request From: mjk@fluffy.rice.edu (Mark J. Kilgard) Newsgroups: comp.sys.sun Subject: bug with indent Keywords: SunOS Message-ID: <3782@kalliope.rice.edu> Date: 3 Jun 89 05:07:12 GMT Sender: usenet@rice.edu Organization: Sun-Spots Lines: 45 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 8, Issue 24, message 8 of 10 The following bug with indent has come to my attention. Constructs like =* and =& and such get confused and actually get switched to avoid anachronisms! Example: main() /* compiles without errors */ { int a=1; int* b; int c; b=&a; c=*b; } after indent -npro main() { int a = 1; int *b; int c; b &= a; c *= b; } error messages from cc: "foo.c", line 8: operands of &= have incompatible types "foo.c", line 9: operands of *= have incompatible types (I'm in SunOS 4.0 land. But I assume the bug is in 3.5 too. The compiler will probably give different messages. It's probably a BSD bug. Maybe well know but this is the first time I've encountered it.) This is very annoying. It basically breaks your code that should work. The work around is to simply better space your code if you plan to run it through indent. I appreciate moving away from anachronisms and all but not if my code breaks. - Mark