-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Open
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"diverges-from:gccDoes the clang frontend diverge from gcc on this issueDoes the clang frontend diverge from gcc on this issue
Description
The following program demonstrates the issue:
int main(void){
const int(*p)[2]=0;
void*q=p;
}Before C23, const int[2] was not considered a qualified type so this conversion was valid. GCC allows it, Clang incorrectly rejects it. Here is another example that demonstrates the opposite:
int main(void){
int(*p)[2]=0;
const int(*q)[2]=p;
}const int[2] is not a qualified version of int[2] before C23, so this conversion was invalid. GCC rejects it, Clang incorrectly allows it.
Metadata
Metadata
Assignees
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"diverges-from:gccDoes the clang frontend diverge from gcc on this issueDoes the clang frontend diverge from gcc on this issue