GCC Bugzilla – Bug 44257
typeof(*(struct undefined *)) fails to compile
Last modified: 2010-05-24 00:29:46 UTC
typeof(struct foo) *p; // This is fine.
typeof(*p) *p2; // foo.c:5: error: dereferencing pointer to incomplete type
This is important, because AFAICT the only way to declare a const pointer for a given type is: "const typeof(*p) *" which doesn't work if p is a pointer to an undefined struct :(