frr/tools/gcc-plugins/gcc-retain-typeinfo.patch
David Lamparter 7ff9120698 tools/gcc-plugins: frr-format
This provides the first reasonably-working version of the frr-format GCC
plugin.  I've only tested it with gcc 9.3.0.

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-03-29 10:45:46 +02:00

12 lines
384 B
Diff

--- 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");