GCC Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
testsuite

Testsuite: Fix reflect/bases_of5.C for -m32

The test case reflect/bases_of5.C now compiles correctly in 32-bit mode by using `decltype (sizeof 0)` instead of `unsigned long`.

The test case reflect/bases_of5.C was failing in 32-bit mode. This commit fixes the issue by using decltype (sizeof 0) instead of unsigned long to ensure compatibility with the 32-bit architecture.

In Details

This commit fixes a test case for the reflection feature. The test reflect/bases_of5.C was failing when compiled with the -m32 flag. The fix involves using decltype (sizeof 0) instead of unsigned long to ensure the correct type size for the target architecture.

For Context

This commit fixes a test case in the GCC testsuite. The testsuite is a collection of programs used to verify that the compiler is working correctly. This particular test case, related to reflection (a feature that allows a program to inspect its own structure), was failing when compiled for a 32-bit architecture. The fix ensures that the test now passes on 32-bit systems.

Filed Under: testsuitereflection32-bit