cca
cca copied to clipboard
[cpp] parser failures
We found a few more parser failures you might be interested in:
int main() {
int func(int x);
int result = ((func))(3) - 3; // fails here
}
int main() {
struct S f;
s += ((*((f)->function))(1, (f)->params) + (*((f)->function))(1, (f)->params)); // fails here
}
int main() {
void(b ? (void)printf("IPTV1: ") : void()); // fails here
}
int main() {
auto var = new ("text", 61, FUNC) int(); // fails here
}
int main() {
int status;
// this enters an infinite loop printing a message
do {
#ifdef A
} while (status & A);
#elif defined(B)
} while (status & B);
#else
} while (status & 3);
#endif
}
int main() {
bool btf;
int (*pfunc)(int, int);
for (; btf && (*pfunc)(0, 0);) // fails here
;
}
int main() {
int isize = 3;
assert((isize == sizeof(unsigned int)) && ("")); // fails here
}
int main() {
int block_size = 3, block_count = 4;
rt_malloc((block_size + sizeof(int *)) * block_count); // fails here
}
int main() {
if (((size_t)sizeof(double)) & (((size_t)sizeof(double)) - 1)) // fails here
;
}
int(params_allocation)[7]; // fails here
int main() {}
Thank you for reporting. We will look into them.
The latest fix (c86e9dda91b680c46389ac6fad1472162e778ed5) works for them.
Sorry for the late reply, this looks great. Thank you.