+2020-08-25 Alan Modra <amodra@gmail.com>
+
+ PR 26410
+ * symbols.c (dollar_label_count, dollar_label_max): Make size_t.
+ (dollar_label_clear): Don't call memset with NULL pointer.
+
2020-08-25 Alan Modra <amodra@gmail.com>
* config/tc-arc.c (declare_register_set): Avoid false positive
static long *dollar_labels;
static long *dollar_label_instances;
static char *dollar_label_defines;
-static unsigned long dollar_label_count;
-static unsigned long dollar_label_max;
+static size_t dollar_label_count;
+static size_t dollar_label_max;
int
dollar_label_defined (long label)
void
dollar_label_clear (void)
{
- memset (dollar_label_defines, '\0', (unsigned int) dollar_label_count);
+ if (dollar_label_count)
+ memset (dollar_label_defines, '\0', dollar_label_count);
}
#define DOLLAR_LABEL_BUMP_BY 10