File: gcc-retain-typeinfo.patch

package info (click to toggle)
frr 10.5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 77,224 kB
  • sloc: ansic: 687,301; python: 227,378; perl: 6,379; sh: 2,685; cpp: 1,883; makefile: 670; yacc: 397; lex: 363; lisp: 66; xml: 35; javascript: 8
file content (11 lines) | stat: -rw-r--r-- 384 bytes parent folder | download | duplicates (3)
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");