Article View: comp.std.c
Article #1881A question about sizeof
From: Erkki Ruohtula
Date: Mon, 22 Oct 1990 08:32
Date: Mon, 22 Oct 1990 08:32
13 lines
1110 bytes
1110 bytes
The standard says that "sizeof something_of_array_type" gives the size of the
array, not that of the pointer to the first element. But when does the
"arrayness" disappear in the conversion to pointer? What should
"sizeof (struct_pointer->field_of_array_type)" be? Do the parentheses affect
the interpretation?
There is a compiler that gives the pointer size in the last example, and I am
wondering, whether or not this is a bug.
--
Erkki Ruohtula / Nokia Telecommunications
eru@tele.nokia.fi / P.O. Box 33 SF-02601 Espoo, Finland
Disclaimer: These are my private opinions and do not represent the position
of Nokia Telecommunications.
Technical Details
Message-ID:
<ERU.90Oct22103249@tnvsu1.tele.nokia.fi>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!nih-csl!lhc!adm!cmcl2!rutgers!mit-eddie!bloom-beacon!eru!hagbard!sunic!news.funet.fi!funic!santra!mjolner!newshost!eruShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!nih-csl!lhc!adm!cmcl2!rutgers!mit-eddie!bloom-beacon!eru!hagbard!sunic!news.funet.fi!funic!santra!mjolner!newshost!eru From: eru@tnvsu1.tele.nokia.fi (Erkki Ruohtula) Newsgroups: comp.std.c Subject: A question about sizeof Message-ID: <ERU.90Oct22103249@tnvsu1.tele.nokia.fi> Date: 22 Oct 90 08:32:49 GMT Sender: news@mjolner.tele.nokia.fi Distribution: comp Organization: Nokia Telecommunications Lines: 13