From: johnny AT tecc DOT co DOT uk (John Knottenbelt) Subject: Re: bool and gcc 11 Aug 1998 15:04:34 -0700 Message-ID: References: <3 DOT 0 DOT 1 DOT 32 DOT 19980810163711 DOT 0069a178 AT friko6 DOT onet DOT pl> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII To: Inquisitor Nikodemus 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".