mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-13 22:33:03 +00:00
variant: produce stable results
Improve the output by ensuring a well defined order for type switches. * src/uniqstr.h: Style changes for macro arguments. (UNIQSTR_CMP): Replace by... (uniqstr_cmp): this. * src/uniqstr.c (uniqstr_cmp): New. Produce well defined results. * src/output.c: Use it.
This commit is contained in:
@@ -40,7 +40,7 @@ uniqstr uniqstr_vsprintf (char const *format, ...)
|
||||
|
||||
/* Compare two uniqstr a la strcmp: negative for <, nul for =, and
|
||||
positive for >. Undefined order, relies on addresses. */
|
||||
# define UNIQSTR_CMP(USTR1, USTR2) ((USTR1) - (USTR2))
|
||||
int uniqstr_cmp(uniqstr u1, uniqstr u2);
|
||||
|
||||
/* Die if STR is not a uniqstr. */
|
||||
void uniqstr_assert (char const *str);
|
||||
|
||||
Reference in New Issue
Block a user