+2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
+
+ PR c/45584
+ * c-typeck.c (build_c_cast): Do a conversion even when the
+ TYPE_MAIN_VARIANTs are the same.
+
2014-08-19 Marek Polacek <polacek@redhat.com>
* c-decl.c (diagnose_mismatched_decls): Unconditionally call
|| TREE_CODE (type) == UNION_TYPE)
pedwarn (loc, OPT_Wpedantic,
"ISO C forbids casting nonscalar to the same type");
+
+ /* Convert to remove any qualifiers from VALUE's type. */
+ value = convert (type, value);
}
else if (TREE_CODE (type) == UNION_TYPE)
{
+2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
+
+ PR c/45584
+ * gcc.dg/pr13519-1.c: Adjust.
+
2014-08-19 Mark Wielaard <mjw@redhat.com>
* gcc.dg/guality/const-volatile.c: Add `used' attribute to pi.
PR debug/59051
* gcc.dg/guality/restrict.c: New test.
-2014-07-03 Mark Wielaard <mjw@redhat.com>
+2014-08-19 Mark Wielaard <mjw@redhat.com>
* lib/gcc-gdb-test.exp (gdb-test): Handle type:var for gdb ptype
matching. Catch '<unknown type in ' to recognize older gdb versions.
{ __typeof__(n) a1; a1=0; }
{ __typeof__(c) a2; a2=0; } /* { dg-error "read-only" "correct error" } */
{ __typeof__((int)n) a3; a3=0; }
- { __typeof__((int)c) a4; a4=0; } /* { dg-bogus "read-only" "bogus error" { xfail *-*-* } } */
- { __typeof__((const int)n) a5; a5=0; } /* { dg-error "read-only" "correct error" { xfail *-*-* } } */
- { __typeof__((const int)c) a6; a6=0; } /* { dg-error "read-only" "correct error" } */
+ { __typeof__((int)c) a4; a4=0; } /* { dg-bogus "read-only" "bogus error" } */
+ { __typeof__((const int)n) a5; a5=0; }
+ { __typeof__((const int)c) a6; a6=0; }
{ __typeof__(0) a7; a7=0; }
{ __typeof__(1) a8; a8=0; }