summaryrefslogtreecommitdiffstats
path: root/tools/gcc-plugins/gcc-retain-typeinfo.patch
blob: ec51f0be6f57ff6c5fa71506f46f6849897fad15 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- a/src/gcc/c/c-typeck.c
+++ b/src/gcc/c/c-typeck.c
@@ -5716,8 +5716,6 @@ build_c_cast (location_t loc, tree type, tree expr)
   if (objc_is_object_ptr (type) && objc_is_object_ptr (TREE_TYPE (expr)))
     return build1 (NOP_EXPR, type, expr);
 
-  type = TYPE_MAIN_VARIANT (type);
-
   if (TREE_CODE (type) == ARRAY_TYPE)
     {
       error_at (loc, "cast specifies array type");