Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbatt!cwruecmp!hal!ncoast!allbery From: allbery@ncoast.UUCP Newsgroups: news.software.b,comp.lang.c Subject: Re: News for Xenix on PC AT ? Message-ID: <2447@ncoast.UUCP> Date: Thu, 30-Apr-87 19:55:48 EDT Article-I.D.: ncoast.2447 Posted: Thu Apr 30 19:55:48 1987 Date-Received: Sat, 2-May-87 14:18:00 EDT References: <18346@ucbvax.BERKELEY.EDU> <145@sds.UUCP> Reply-To: allbery@ncoast.UUCP (Brandon Allbery) Followup-To: news.software.b Organization: Cleveland Public Access UN*X, Cleveland, Oh Lines: 37 Xref: utgpu news.software.b:553 comp.lang.c:1930 As quoted from <17436@sun.uucp> by guy%gorodish@Sun.COM (Guy Harris): +--------------- | >>now, later in my program if I have NULL defined as 0, then the following | >line will cause the wrong number of bytes to be pushed on the stack: | > | > myfunc( i1, NULL, i2 ); | | 1) Your program will *also* have problems if you define NULL as | "(void *)0", if "(char *)0" and "(void *)0" don't have the same | representation. +--------------- Pardon me???! (void *) is a GENERIC pointer, is it not? It should, in theory, be a type pun in all situations (if casting the result of a rational malloc() (defined as returning (void *)) changes the representation of the pointer returned, we've got trouble, no?). +--------------- | 2) Your program *won't* have problems if you defined "myfunc" as | | char * | myfunc(int ind, char *str, int ind2) +--------------- If you have an X3J11 compiler, let me know; *mine* takes (void *) and proceeds to ignore the argument/variable from that point on (no error on the type, but the variable is not defined). Which compiler? Which machine? ++Brando -- Copyright (C) 1987 Brandon S. Allbery -- you can redistribute only if your recipients can. Brandon S. Allbery {decvax,cbatt,cbosgd}!cwruecmp!ncoast!allbery Tridelta Industries {ames,mit-eddie,talcott}!necntc!ncoast!allbery 7350 Corporate Blvd. necntc!ncoast!allbery@harvard.HARVARD.EDU Mentor, OH 44060 +01 216 255 1080