[cfe-dev] Clang does not warn on casting away type qualifier.

Michael Han fragmentshaders at gmail.com
Thu Apr 11 21:39:04 PDT 2013


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130411/be8decef/attachment.html>


More information about the cfe-dev mailing list