This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH C/C++] Fix some diagnostics problems


On 06/08/2010 11:04 PM, Shujing Zhao wrote:
Do you mean remove them as the following?

@@ -727,10 +727,7 @@
   else if (TREE_CODE (init) == TREE_LIST
           && TREE_TYPE (init) != unknown_type_node)
     {
-      if (TREE_CODE (decl) == RESULT_DECL)
-       init = build_x_compound_expr_from_list (init,
-                                               "return value initializer");
-      else if (TREE_CODE (init) == TREE_LIST
+      if (TREE_CODE (init) == TREE_LIST
               && TREE_CODE (TREE_TYPE (decl)) == ARRAY_TYPE)
        {
          error ("cannot initialize arrays using this syntax");

Yes. But better would be to replace it with


gcc_assert (TREE_CODE (decl) != RESULT_DECL);

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]