From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: struct bug? Date: 29 Aug 2003 10:19:29 GMT Organization: Aachen University of Technology (RWTH) Lines: 21 Message-ID: References: NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 1062152369 3192 137.226.32.75 (29 Aug 2003 10:19:29 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 29 Aug 2003 10:19:29 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com News Reader wrote: > because Gcc obviously has problems with > sizeof("structured type member") . No. It doesn't even get to the 'sizeof' --- the error is in the expression inside those parentheses. > structure (e.g. 'abt' as stated below), but not a > structure member (e.g. 'abt.a'). Mainly because 'abt.a' isn't a valid expression in the first place. The '.' operator only works on objects, not on types. In other words: GCC is correctly rejecting this code --- it's not written in correct C. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.