delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/08/11/15:04:34

From: johnny AT tecc DOT co DOT uk (John Knottenbelt)
Subject: Re: bool and gcc
11 Aug 1998 15:04:34 -0700 :
Message-ID: <Pine.GSO.3.96.980811094934.2171G-100000.cygnus.gnu-win32@handbag.tecc.co.uk>
References: <3 DOT 0 DOT 1 DOT 32 DOT 19980810163711 DOT 0069a178 AT friko6 DOT onet DOT pl>
Mime-Version: 1.0
To: Inquisitor Nikodemus <inquisit AT friko6 DOT onet DOT pl>
Cc: gnu-win32 AT cygnus DOT com

On Mon, 10 Aug 1998, Inquisitor Nikodemus wrote:

> Hey!
> 
> Does gcc (egcs exactly) support boolean (bool) type?

Yup. Should do.
 
> What does the following mean ?
> 
> .cc:120: warning: name lookup of `index' changed for new ANSI `for' scoping
> .cc:119: warning:   using obsolete binding at `index'
> 
> What's that "new ANSI 'for' scoping" ?

for (int index = 0; index < 5; index++) {
	// index variable only defined here
}

// index variable no longer defined here.


(The old 'for' scoping meant that index was valid after the for loop as
well, which leads to problems when you type something like:

for (int i = 0; i < 5; i++) { ... }
for (int i = 0; i < 5; i++) { ... }

Because it moans about i being redefined.)

> And the next one :
> _x.cc:122: request for member `figure' in `nodebufstat', which is of
> non-aggregate type `node *'
> 
> Line 122 is :  *(nodebufstat).figure=-1 ;

Use

nodebufstat->figure

or

(*nodebufstat).figure

The problem is that the '.' binds more strongly than the '*'

Cheers

> thats the structure "node" :
> 
> typedef struct {
>                 char  figure;
>                 short base1,base2;
>                } node;
> 
> ... and that's declaration of nodebufstat pointer :
> 
> node  *nodebufstat=&stattab[0];
> 
> stattab is an array of node type :
> 
> node   stattab[16];
> 
> What is that ?
> 
> /greetz
> Nikki (aka Inquisitor Nikodemus)
> 
> -
> For help on using this list (especially unsubscribing), send a message to
> "gnu-win32-request AT cygnus DOT com" with one line of text: "help".
> 

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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