delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/04/08/06:45:34

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: BUG: mixing C constructors and field index fools gcc 2.9.5.2
Date: 8 Apr 2002 10:42:08 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 21
Message-ID: <a8rs60$b9$1@nets3.rz.RWTH-Aachen.DE>
References: <20020406135915 DOT 23603 DOT qmail AT web10701 DOT mail DOT yahoo DOT com>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 1018262528 361 137.226.32.75 (8 Apr 2002 10:42:08 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 8 Apr 2002 10:42:08 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Martin Sylvain <pype_1999 DOT geo AT yahoo DOT com> wrote:
[...]
> As i'm a lazy coder, i do not feel the need to declare the content of the
> 'lock' component and only want to give a value to 'count', other fields can
> remain zeroes, that's ok for me, so i write

> mySem=(struct kSemaphore){count:1};

That syntax is wrong, I think.  You should have written

	mySem = (struct kSemaphore){count = 1};

':' indicates bitfields, not field names.  Check 

	info gcc "C Extensions" "labeled elements" 

again.

-- 
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