[Bug c/44257] New: typeof(*(struct undefined *)) fails to compile
rusty at rustcorp dot com dot au
gcc-bugzilla@gcc.gnu.org
Mon May 24 00:29:00 GMT 2010
struct foo;
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 :(
--
Summary: typeof(*(struct undefined *)) fails to compile
Product: gcc
Version: 4.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rusty at rustcorp dot com dot au
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44257
More information about the Gcc-bugs
mailing list