On Sun, Jun 25, 2000 at 04:10:30PM -0500, Don B. Roadman wrote: > compiler blythely does everything, but is oblivious to the fact that it > has assigned a variable to a location, so Its not smart enought to > check before it uses it for some other variable. Just look at the It's not a question of not being smart enough, it's an issue of whether that's how the compiler should behave. I've looked at this issue several times, and asked various people for opinions on which way it should work, and so far there has not been any convincing reason to make the compiler/linker take note of absolute variable placements when allocating space. The bit vs. byte issue is the only one that comes up regularly, and there are several other (and IMHO better, i.e. more portable) ways to address this problem. You do not have to "write a lot of confusing code" - you may need to write a small amount of confusing declarations or macros, but our FAQ gives the boilerplate to do that, and the code itself can be reduced to the same degree of complexity as for any other approach. The manner in which e.g. port bits are defined in terms of the (absolute) port address is in fact something of a hack, and can be justified only because I/O ports and SFRs in general are very tightly coupled to the hardware, and therefore it's ok to have non-portable constructs to access them. For non-hardware related issues, non-portable code is a Bad Idea. You may not believe this now, but you will one day. There are, OTOH, a couple of reasonably good reasons to allow you to place absolute variables anywhere without it affecting anything else, so for the forseeable future, the status quo will rule. Cheers, Clyde -- Clyde Smith-Stubbs | HI-TECH Software Email: clyde@htsoft.com | Phone Fax WWW: http://www.htsoft.com/ | USA: (408) 490 2885 (408) 490 2885 PGP: finger clyde@htsoft.com | AUS: +61 7 3355 8333 +61 7 3355 8334 --------------------------------------------------------------------------- HI-TECH C: compiling the real world.