Clang does not warn on casting away type qualifier.

Hi,

This code would get a warning on g++ with -Wcast-qual:

int *func(const int *ci) {
return (int *)ci;
}

Clang does not warn on this code because driver parses the -Wcast-qual and just ignores it. Is this warning designed to be ignored in Clang or is it just not implemented yet?

Michael.

Just not implemented yet.

John.

Just not implemented yet.

It is llvm.org/pr13772

John.

Cheers,
Rafael

I see. Thanks.

Michael.