<div dir="ltr"><div>Hi, <br><br></div>Does Clang support the warning flag -Wcast-qual? I have the following program, <br><br>$: cat t.c <br>int * f (const int*a) {<br>  return (int *)a;<br>}<br><br><br>$: clang-trunk -Weverything -c t.c <br>
t.c:1:7: warning: no previous prototype for function 'f' [-Wmissing-prototypes]<br>int * f (const int*a) {<br>      ^<br>1 warning generated.<br>$: <br>$: gcc-trunk -Wcast-qual -c t.c <br>t.c: In function ‘f’:<br>
t.c:2:10: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual]<br>   return (int *)a;<br>          ^<br><br><br clear="all"><div><div><br>-- <br>Best Regards.<br><br>Chengnian SUN.
</div></div></div>