Bug 000176

When Created: 09/30/1997 15:17:50
Against DJGPP version: 2.01
By whom:
Abstract: Doesn't report invalid structures correctly.
I created a program with a structure defined with the name XBASEFIELD.  I
later incorrectly used the statement 'struct XBASEFILED *xfldstrt' in which
I transposed the E and L.

Instead of reporting an invalid structure, the compiler kept coming back with
'dereferencing pointer to an invalid type.', on all the lines that included
pointers within the incorrect structure.  Shouldn't the compiler have picked
up on the fact that I had used an incorrect structure name and reported that
as an error in addition to the referencing errors?


Note added: 10/01/1997 13:14:59
By whom:
That's not a bug, really.

The compiler would be wrong if it told you that the structure
name in your declaration were wrong. That's because you are
actually allowed to declare pointers even to yet undeclared 
structures, AFAIK. You just have to define them before you use
the fields of the structure. This is necessary for things like linked
lists to be able to work:

struct list {
  int content1;
  int more_content;
  struct list * next;

Solution added: 10/01/1997 13:17:14
By whom:
No bug, thus no solution needed, I'd say :-)

Closed on 10/09/1997 19:55:00: not a bug
By whom:

  webmaster     delorie software   privacy  
  Copyright 2010   by DJ Delorie     Updated Jul 2010