An enhancement to GCC 10 to improve the expansion of strncmp calls with strings with embedded nuls introduced a regression in similar calls to memcmp. A review of the changes that led up to the regression exposed a number of questionable choices that likely conspired to cause the bug. For example, the name of the function with both the strncmp enhancement as well as the memcmp bug is inline_expand_builtin_string_cmp(). It's easy to assume that the function handles calls to strcmp and strncmp but not also memcmp. Another similar example is the name of the second c_getstr() argument -- strlen -- that doesn't actually store the length of the retrieved string but rather its size in bytes (including any embedded nuls, but excluding those appended implicitly to zero out the remainder of an array the string is stored in, up to the array's size). Yet another example of a dubious choice is string_constant() returning the empty string (i.e., STRING_CST with size 1) for zero initializers of constants of any type (as opposed to one of the same size as the constant object). Besides fixing the memcmp bug the attached patch (hopefully) also rectifies some of the otherwise more or less benign mistakes that precipitated it, mostly by clarifying comments and changing misleading names of functions, their arguments, or local variables. A happy consequence of the fixes is that they improve codegen for calls to memcpy with constants whose representation includes embedded nuls. Tested on x86_64-linux. Martin