Path: 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: Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 14 In article 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.