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: [PATCHv2] Call braced_list_to_string after array size is fixed


On 08/24/2018 03:52 PM, Bernd Edlinger wrote:
this updated patch fixes one regression with current trunk due
to a new test case.  Sorry for the confusion.

The change to the previous version is:
1) the check to avoid folding on empty char arrays is restored.
2) A null-termination character is added except when the string is full length.

-		      && TYPE_STRING_FLAG (TREE_TYPE (valtype)))

+      tree typ1 = TYPE_MAIN_VARIANT (TREE_TYPE (type));
+      if (typ1 == char_type_node
+	  || typ1 == signed_char_type_node
+	  || typ1 == unsigned_char_type_node)


Why stop using TYPE_STRING_FLAG?

Jason


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