C struct definition with initialization question

Viewed 69

I saw this struct definition in an old Olden benchmark perimeter:

typedef struct quad_struct {
  Color color;
  ChildType childtype;

#ifndef TORONTO
  struct quad_struct *nw {50};
  struct quad_struct *ne {50};
  struct quad_struct *sw {50};
  struct quad_struct *se {50};
  struct quad_struct *parent {50};
#else
  struct quad_struct *nw;
  struct quad_struct *ne;
  struct quad_struct *sw;
  struct quad_struct *se;
  struct quad_struct *parent;
#endif

} quad_struct, *QuadTree;

(You can find the code at: https://github.com/llvm-mirror/test-suite/blob/master/MultiSource/Benchmarks/Olden/perimeter/perimeter.h#L22)

What does struct quad_struct *nw {50}; do? It looks like initializing a pointer to a constant value. I tried compiling this kind of code with modern compilers, e.g., llvm 10 or gcc 9, and I got compile error error: expected ';' at end of declaration list struct quad_struct *nw {50};

1 Answers
Related