home *** CD-ROM | disk | FTP | other *** search
- Path: nntp.teleport.com!sschaem
- From: sschaem@teleport.com (Stephan Schaem)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: PPC compilers
- Date: 9 Jan 1996 20:04:00 GMT
- Organization: Teleport - Portland's Public Access (503) 220-1016
- Message-ID: <4cuhng$dmn@maureen.teleport.com>
- References: <john.hendrikx.40ka@grafix.xs4all.nl> <MQAQx*XOe@yaps.rhein.de> <OWhVx*42f@yaps.rhein.de>
- NNTP-Posting-Host: kelly.teleport.com
- X-Newsreader: TIN [version 1.2 PL2]
-
- Arno Eigenwillig (arno@yaps.rhein.de) wrote:
- : In article <4cokkg$415@maureen.teleport.com>, Stephan Schaem writes:
-
- : > So you do math operation without knowing that your destination need to
- : > be a float or a 2 byte int?
-
- : Why don't you read what he wrote? A reasonable example for that would
- : be operations on clock_t.
-
- The claim was general: you can forget your variable type when you use
- them in C... I'm just saying thats its not wise.
-
- : > So you created a structure to hold clock value with ulong? now recompile
- : > this on the system using a clock size of 64bit... where did the upper
- : > 32bit goes... you know have code that is broken.
-
- : Why don't you read what he wrote? You use clock_t and treat it as a
- : 'black box'. As you never name the underlying type, you are fully
- : portable.
-
- What if clock_t is on other system a pointer to a bcpl string?
-
- : > It could be done in a macro assembler by 'tydefing' instruction size.
-
- : Name an existing assembler that allows such things.
-
- You can write yourself a simple preprocessor that will do a search replace
- using a mytype.typedef file... The point I wanted to make is this:
-
- [Store variable of type A, into variable of type A]
-
- This is what I think when I write
-
- chipreg->bltcon0 = con0;
-
- [Store con0 of type CHIPREG, into chipreg.bltcon0 of type CHIPREG]
-
- &
-
- move.w (GLOBAL_con0_w,a4),(CHIPREG_bltcon0_w,a1)
-
- [Store con0 of type WORD, into chipreg.bltcon0 of type WORD]
-
- here I just happen to know WORD is 2 byte.. but so what.
-
- This programming logic enable people to corectly declar and use there
- variable.
-
- This is the last I have to say about it. I repeated myself too much already
-
- Stephan
-