+2000-12-28 Jeffrey Oldham <oldham@codesourcery.com>
+
+ * varasm.c (initializer_constant_valid_p): Indicate subtraction of
+ pointers to the same string constant is absolute.
+
2000-12-28 Joseph S. Myers <jsm28@cam.ac.uk>
* c-common.c (enum format_type): Add strfmon_format_type.
Then the value is absolute. */
if (valid0 == valid1 && valid0 != 0)
return null_pointer_node;
+
+ /* Since GCC guarantees that string constants are unique in the
+ generated code, a subtraction between two copies of the same
+ constant string is absolute. */
+ if (valid0 && TREE_CODE (valid0) == STRING_CST &&
+ valid1 && TREE_CODE (valid1) == STRING_CST &&
+ TREE_STRING_POINTER (valid0) == TREE_STRING_POINTER (valid1))
+ return null_pointer_node;
}
/* Support differences between labels. */