delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/08/29/06:30:20

From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
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: <bin9bh$33o$1@nets3.rz.RWTH-Aachen.DE>
References: <bin4ql$sfh$1 AT newsreader1 DOT netway DOT at>
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 <nospam AT aol DOT com> 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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019