summaryrefslogtreecommitdiff
path: root/doc/const_cast.c
blob: 0a7c070687406af0ba1cfb569c93dc02e0fbffa6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/*
	Fails to compile with gcc-4.7, 4.8 with the error message
	"const_cast.c:5:13: error: dereferencing pointer to incomplete type".
	But __typeof__(*f) is just a fancy way of writing "struct undisclosed"
	and should be permitted. (Request for enhancement)
*/
struct undisclosed;
int main(void) {
	const struct undisclosed *f = 0;
	__typeof__(*f) *g = 0;
	return 0;
}