1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2026-10-24 00:48:56 +03:00

isinf-no-c++-tests: pacify -Wshadow

* tests/test-isinf.c (mem_long_double): Rename this local type
from memory_long_double, to avoid confusion with the top-level
memory_long_double in snan.h.  All uses changed.
This commit is contained in:
Paul Eggert
2026-01-13 07:51:58 -08:00
parent 643dd87692
commit 0461209ee0
2 changed files with 15 additions and 8 deletions

View File

@@ -1,3 +1,10 @@
2026-01-13 Paul Eggert <eggert@cs.ucla.edu>
isinf-no-c++-tests: pacify -Wshadow
* tests/test-isinf.c (mem_long_double): Rename this local type
from memory_long_double, to avoid confusion with the top-level
memory_long_double in snan.h. All uses changed.
2025-12-04 Basil L. Contovounesios <basil@contovou.net>
doc: Add maintainer-makefile section to manual.

View File

@@ -124,7 +124,7 @@ test_isinfl ()
#define NWORDS \
((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
typedef union { unsigned int word[NWORDS]; long double value; }
memory_long_double;
mem_long_double;
/* Representation of an 80-bit 'long double' as an initializer for a sequence
of 'unsigned int' words. */
# ifdef WORDS_BIGENDIAN
@@ -138,39 +138,39 @@ test_isinfl ()
{ mantlo, manthi, exponent }
# endif
{ /* Quiet NaN. */
static memory_long_double x =
static mem_long_double x =
{ .word = LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
ASSERT (!isinf (x.value));
}
{
/* Signalling NaN. */
static memory_long_double x =
static mem_long_double x =
{ .word = LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
ASSERT (!isinf (x.value));
}
/* isinf should return something for noncanonical values. */
{ /* Pseudo-NaN. */
static memory_long_double x =
static mem_long_double x =
{ .word = LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
ASSERT (isinf (x.value) || !isinf (x.value));
}
{ /* Pseudo-Infinity. */
static memory_long_double x =
static mem_long_double x =
{ .word = LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
ASSERT (isinf (x.value) || !isinf (x.value));
}
{ /* Pseudo-Zero. */
static memory_long_double x =
static mem_long_double x =
{ .word = LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
ASSERT (isinf (x.value) || !isinf (x.value));
}
{ /* Unnormalized number. */
static memory_long_double x =
static mem_long_double x =
{ .word = LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
ASSERT (isinf (x.value) || !isinf (x.value));
}
{ /* Pseudo-Denormal. */
static memory_long_double x =
static mem_long_double x =
{ .word = LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
ASSERT (isinf (x.value) || !isinf (x.value));
}