[libc-commits] [libc] [libc] Build with -Wshadow (PR #197516)

Simi Pallipurath via libc-commits libc-commits at lists.llvm.org
Thu May 14 05:51:38 PDT 2026


simpal01 wrote:

 Hi,

We (https://github.com/arm/arm-toolchain) started seeing a new build failure after the recent `[libc] Build with -Wshadow` change in PR https://github.com/llvm/llvm-project/pull/197516 

The error we see is:
```
    In file included from libc/src/stdio/vsprintf.cpp:17:
    In file included from libc/src/stdio/printf_core/printf_main.h:15:
    In file included from libc/src/stdio/printf_core/converter.h:21:
    In file included from libc/src/stdio/printf_core/converter_atlas.h:35:
    libc/src/stdio/printf_core/float_hex_converter.h:36:9: error:
      declaration shadows a type alias in namespace '...::printf_core'
      [-Werror,-Wshadow]
        using StorageType = LDBits::StorageType;
              ^
    libc/src/stdio/printf_core/float_dec_converter_limited.h:65:7: note:
      previous declaration is here
    using StorageType = fputil::FPBits<long double>::StorageType;
```
  With -Wshadow enabled, this now fails because both
  `float_dec_converter_limited.h` and `float_hex_converter.h` define `StorageType` which Clang now diagnoses as shadowing and fails.

https://github.com/llvm/llvm-project/pull/197516


More information about the libc-commits mailing list