Article View: comp.sys.atari.st
Article #24330Re: Lattice C compiler bug
From: Vicarious Oyster
Date: Thu, 08 Jan 1987 20:16
Date: Thu, 08 Jan 1987 20:16
23 lines
1346 bytes
1346 bytes
In article <2330@eagle.ukc.ac.uk> pc@ukc.ac.uk (R.P.A.Collinson) writes:
>
>The following C bits will generate incorrect code:
>
> char buffer[BUFSIZ];
>
> register char *pt;
> register n;
>
> /* How many bytes left in the buffer please ? */
> n = &buffer[BUFSIZ] - pt;
>
Doesn't the declaration "register char *pt;" mean "a pointer to a
register," in fact? Can you tell me what a pointer to a register is?
Supposedly, that kind of (presumably) illegal declaration is ignored,
but I can see where a writer of a <$100 compiler might not handle it
correctly. That's no excuse, of course...
--
- Joel ({allegra,ihnp4,seismo}!uwvax!uwmacc!oyster)
Disclaimer:
The above, unless otherwise labeled, constitutes personal opinion.
Technical Details
Message-ID:
<864@uwmacc.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!ut-sally!husc6!uwvax!uwmacc!oysterReferences:
<2330@eagle.ukc.ac.uk>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!ut-sally!husc6!uwvax!uwmacc!oyster From: oyster@uwmacc.UUCP (Vicarious Oyster) Newsgroups: comp.sys.atari.st Subject: Re: Lattice C compiler bug Message-ID: <864@uwmacc.UUCP> Date: Thu, 8-Jan-87 15:16:26 EST Article-I.D.: uwmacc.864 Posted: Thu Jan 8 15:16:26 1987 Date-Received: Thu, 8-Jan-87 23:06:30 EST References: <2330@eagle.ukc.ac.uk> Reply-To: oyster@unix.macc.wisc.edu.UUCP (Vicarious Oyster) Organization: UW-Madison Academic Computer Center Lines: 23 Summary: On second thought...