Xref: utzoo comp.lang.c:9318 comp.arch:4342 Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!oliveb!sun!limes From: limes@sun.uucp (Greg Limes) Newsgroups: comp.lang.c,comp.arch Subject: sizeof behavior (was Bit Addressable Architectures) Message-ID: <49530@sun.uucp> Date: 14 Apr 88 17:10:12 GMT References: <11702@brl-adm.ARPA> <243@eagle_snax.UUCP> <2245@geac.UUCP> <8646@eleazar.Dartmouth.EDU> Organization: Sun Microsystems, Inc. - Mtn View, CA Lines: 11 Summary: probably not portable In article <8646@eleazar.Dartmouth.EDU>, major@eleazar.Dartmouth.EDU (Lou Major) writes: > char foo[]="This is a test."; > sizeof (foo) == sizeof (char *) Lou, on my machine (Sun 3/60, SunOS 4.0) this is not true; sizeof (foo) == sizeof foo == 16 This corresponds with the way I have used sizeof with arrays for many years now, and in fact the standard unix kernel configuration files depend on it. Of course, your mileage may vary, but I would like to hear about any machines where sizeof works the way you state. -- Greg Limes [limes@sun.com] frames to /dev/fb