On 03/24/2011 11:56 AM, Kai Tietz wrote:
+ if (TREE_VALUE (a) != NULL_TREE + && TREE_CODE (TREE_VALUE (a)) == TREE_LIST + && TREE_VALUE (attr) != NULL + && TREE_CODE (TREE_VALUE (attr)) == TREE_LIST) + { + if (simple_cst_list_equal (TREE_VALUE (a), + TREE_VALUE (attr)) == 1) + break; + } + else if (simple_cst_equal (TREE_VALUE (a), TREE_VALUE (attr)) == 1)
How about splitting this out into a separate function that can compare either list or expression arguments? That would also be useful for merge_attributes and attribute_list_contained.
Jason