Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!brutus.cs.uiuc.edu!ginosko!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: More NULL questions Message-ID: <11259@smoke.BRL.MIL> Date: 11 Oct 89 07:15:27 GMT References: <5950001@hpldola.HP.COM> <443@shodha.dec.com> <903@abvax.UUCP> <448@shodha.dec.com> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 16 In article <448@shodha.dec.com> devine@shodha.dec.com (Bob Devine) writes: -In article <903@abvax.UUCP>, aep@ivan (Alex E. Pensky) writes: -> Even if pointers and integers are the same size and have the same -> representation, you are still in trouble if your compiler passes int -> parameters and pointer parameters via different mechanisms. - What different mechanisms? C only supports call-by-value for -parameters (I'm ignoring the special casing of arrays here). How -can pointers be passed differently than ints? It sounds like you -used a broken compiler. [This list sure has been getting a lot of GUESSWORK posted to it recently.] A simple example is that the first M integer parameters might be passed in data registers and the first N pointer parameters passed in address registers. Yes, there are compilers that follow conventions like this, and even stranger ones. They are not "broken".