Article View: comp.std.c
Article #1884Re: A question about sizeof
From: Doug Gwyn
Date: Tue, 23 Oct 1990 19:48
Date: Tue, 23 Oct 1990 19:48
14 lines
1321 bytes
1321 bytes
In article <ERU.90Oct22103249@tnvsu1.tele.nokia.fi> eru@tnvsu1.tele.nokia.fi (Erkki Ruohtula) writes: >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. Yes, at least it's not standard conforming. Section 3.3.1 says that the type and value of a parenthesized expression are identical to those of the unparenthesized expression. The three paragraphs in 3.2.2.1 concerning type conversion in certain contexts clearly could not apply, as is particularly evident for a parenthesized lvalue, without contradicting 3.3.1. Since this is a case where naive reading of the standard could produce a contradiction, feel free to send in an official request to X3 for an interpretation ruling on this point.
Technical Details
Message-ID:
<14222@smoke.BRL.MIL>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!sdd.hp.com!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwynReferences:
<ERU.90Oct22103249@tnvsu1.tele.nokia.fi>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!sdd.hp.com!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: A question about sizeof Message-ID: <14222@smoke.BRL.MIL> Date: 23 Oct 90 19:48:37 GMT References: <ERU.90Oct22103249@tnvsu1.tele.nokia.fi> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 14