On Sun, Aug 17, 2014 at 8:27 AM, Marek Polacek <pola...@redhat.com> wrote: > On Sat, Aug 16, 2014 at 09:54:33PM -0400, Patrick Palka wrote: >> --- a/gcc/c/c-typeck.c >> +++ b/gcc/c/c-typeck.c >> @@ -4947,6 +4947,8 @@ build_c_cast (location_t loc, tree type, tree expr) >> || TREE_CODE (type) == UNION_TYPE) >> pedwarn (loc, OPT_Wpedantic, >> "ISO C forbids casting nonscalar to the same type"); >> + >> + value = convert (type, value); > > Maybe a comment saying why we convert the value here anyway would be > useful. Otherwise LGTM.
OK, I'll add the comment "Convert to remove any qualifiers from VALUE's type" to the patch.