Mail Archives: djgpp/1998/11/10/06:00:32
On Tue, 10 Nov 1998, Daniel Mironowicz wrote:
> Hi,
> Here's what i've found:
>
> #include <conio.h>
>
> int main(void)
> {
> int ptr[10];
> int p = ptr[1], // check out the ending of this line
> getch(); // if you remove this line gcc displays error
> msg
> }
When you make bug reports, please say what you thought should
happen and what actually did happen. Most of the time the
problem in this sort of case is that the user's expectations are
wrong. I can't judge in this case because you don't say what
your expectations are.
If you remove the marked line you get:
{
int ptr[10];
* int p = ptr[1],
}
The list in line * is not complete, so gcc reports the error.
What did you expect?
(Also note that `ptr' isn't actually a pointer)
--
george DOT foot AT merton DOT oxford DOT ac DOT uk
xu do jimpe -- http://xiron.pc.helsinki.fi/lojban/
- Raw text -