+2024-04-02 Tom Tromey <tom@tromey.com>
+
+ * cplus-dem.c (cplus_demangle): Try the D demangler with
+ "auto" format.
+ * testsuite/d-demangle-expected: Add --format=auto test.
+
+2024-04-02 Jakub Jelinek <jakub@redhat.com>
+
+ * regex.c (byte_re_match_2_internal): Fix duplicated words in comment;
+ next next -> next.
+ * dyn-string.c (dyn_string_init): Fix duplicated words in comment;
+ of of -> of.
+
+2024-02-19 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR other/113957
+ * pex-unix.c (pex_unix_exec_child): Set pid = -1 in the error
+ paths, since that is used to signal an erroneous outcome for
+ the routine.
+
+2024-02-15 Richard Biener <rguenther@suse.de>
+
+ * hashtab.c (iterative_hash): Remove TBAA violating handling
+ of aligned little-endian case in favor of just keeping the
+ aligned case special-cased. Use | for composing a larger word.
+
+2024-02-12 Jakub Jelinek <jakub@redhat.com>
+
+ * vprintf-support.c (libiberty_vprintf_buffer_size): Handle
+ properly l, ll, z, t or on _WIN32 I64 modifiers for diouxX
+ and L modifier for fFgGeE.
+
+2024-01-13 Jakub Jelinek <jakub@redhat.com>
+
+ * cp-demangle.c (FNQUAL_COMPONENT_CASE): Add case for
+ DEMANGLE_COMPONENT_XOBJ_MEMBER_FUNCTION.
+ (d_dump): Handle DEMANGLE_COMPONENT_XOBJ_MEMBER_FUNCTION.
+ (d_nested_name): Parse H after N in nested name.
+ (d_count_templates_scopes): Handle
+ DEMANGLE_COMPONENT_XOBJ_MEMBER_FUNCTION.
+ (d_print_mod): Likewise.
+ (d_print_function_type): Likewise.
+ * testsuite/demangle-expected: Add tests for explicit object
+ member functions.
+
2023-12-05 Jakub Jelinek <jakub@redhat.com>
* configure.ac (HAVE_X86_SHA1_HW_SUPPORT): Verify __get_cpuid and
/* Performs in-place initialization of a dyn_string struct. This
function can be used with a dyn_string struct on the stack or
- embedded in another object. The contents of of the string itself
+ embedded in another object. The contents of the string itself
are still dynamically allocated. The string initially is capable
of holding at least SPACE characeters, including the terminating
NUL. If SPACE is 0, it will silently be increated to 1.
c = initval; /* the previous hash value */
/*---------------------------------------- handle most of the key */
-#ifndef WORDS_BIGENDIAN
- /* On a little-endian machine, if the data is 4-byte aligned we can hash
- by word for better speed. This gives nondeterministic results on
- big-endian machines. */
- if (sizeof (hashval_t) == 4 && (((size_t)k)&3) == 0)
- while (len >= 12) /* aligned */
+ /* Provide specialization for the aligned case for targets that cannot
+ efficiently perform misaligned loads of a merged access. */
+ if ((((size_t)k)&3) == 0)
+ while (len >= 12)
{
- a += *(hashval_t *)(k+0);
- b += *(hashval_t *)(k+4);
- c += *(hashval_t *)(k+8);
+ a += (k[0] | ((hashval_t)k[1]<<8) | ((hashval_t)k[2]<<16) | ((hashval_t)k[3]<<24));
+ b += (k[4] | ((hashval_t)k[5]<<8) | ((hashval_t)k[6]<<16) | ((hashval_t)k[7]<<24));
+ c += (k[8] | ((hashval_t)k[9]<<8) | ((hashval_t)k[10]<<16)| ((hashval_t)k[11]<<24));
mix(a,b,c);
k += 12; len -= 12;
}
else /* unaligned */
-#endif
while (len >= 12)
{
- a += (k[0] +((hashval_t)k[1]<<8) +((hashval_t)k[2]<<16) +((hashval_t)k[3]<<24));
- b += (k[4] +((hashval_t)k[5]<<8) +((hashval_t)k[6]<<16) +((hashval_t)k[7]<<24));
- c += (k[8] +((hashval_t)k[9]<<8) +((hashval_t)k[10]<<16)+((hashval_t)k[11]<<24));
+ a += (k[0] | ((hashval_t)k[1]<<8) | ((hashval_t)k[2]<<16) | ((hashval_t)k[3]<<24));
+ b += (k[4] | ((hashval_t)k[5]<<8) | ((hashval_t)k[6]<<16) | ((hashval_t)k[7]<<24));
+ c += (k[8] | ((hashval_t)k[9]<<8) | ((hashval_t)k[10]<<16)| ((hashval_t)k[11]<<24));
mix(a,b,c);
k += 12; len -= 12;
}
{
*err = ret;
*errmsg = "posix_spawnp";
+ pid = -1; /* The value of pid is unspecified on failure. */
goto exit;
}
}
{
*err = ret;
*errmsg = "posix_spawn";
+ pid = -1;
goto exit;
}
}
to resume scanning the pattern; the second one is where to resume
scanning the strings. If the latter is zero, the failure point is
a ``dummy''; if a failure happens and the failure point is a dummy,
- it gets discarded and the next next one is tried. */
+ it gets discarded and the next one is tried. */
#ifdef MATCH_MAY_ALLOCATE /* otherwise, this is global. */
PREFIX(fail_stack_type) fail_stack;
#endif
{
if (*p++ == '%')
{
+ int prec = 0;
while (strchr ("-+ #0", *p))
++p;
if (*p == '*')
else
total_width += strtoul (p, (char **) &p, 10);
}
- while (strchr ("hlL", *p))
- ++p;
+ do
+ {
+ switch (*p)
+ {
+ case 'h':
+ ++p;
+ continue;
+ case 'l':
+ case 'L':
+ ++prec;
+ ++p;
+ continue;
+ case 'z':
+ prec = 3;
+ ++p;
+ continue;
+ case 't':
+ prec = 4;
+ ++p;
+ continue;
+#ifdef _WIN32
+ case 'I':
+ if (p[1] == '6' && p[2] == '4')
+ {
+ prec = 2;
+ p += 3;
+ continue;
+ }
+ break;
+#endif
+ default:
+ break;
+ }
+ break;
+ }
+ while (1);
+
/* Should be big enough for any format specifier except %s and floats. */
total_width += 30;
switch (*p)
case 'u':
case 'x':
case 'X':
+ switch (prec)
+ {
+ case 0: (void) va_arg (ap, int); break;
+ case 1: (void) va_arg (ap, long int); break;
+ case 2: (void) va_arg (ap, long long int); break;
+ case 3: (void) va_arg (ap, size_t); break;
+ case 4: (void) va_arg (ap, ptrdiff_t); break;
+ }
+ break;
case 'c':
(void) va_arg (ap, int);
break;
case 'E':
case 'g':
case 'G':
- (void) va_arg (ap, double);
- /* Since an ieee double can have an exponent of 307, we'll
- make the buffer wide enough to cover the gross case. */
- total_width += 307;
+ if (!prec)
+ {
+ (void) va_arg (ap, double);
+ /* Since an ieee double can have an exponent of 308, we'll
+ make the buffer wide enough to cover the gross case. */
+ total_width += 308;
+ }
+ else
+ {
+ (void) va_arg (ap, long double);
+ total_width += 4932;
+ }
break;
case 's':
total_width += strlen (va_arg (ap, char *));