https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121574
--- Comment #10 from d7d1cd <d7d1cd at mail dot ru> --- (In reply to shyeyian from comment #9) My projects always have the -Wall -Wextra -Werror flags enabled. So yes, I try to strictly adhere to the standard when writing programs. I use third-party libraries in my projects. And when modularizing my projects, I, of course, encountered the 'expose TU-local' error. To solve it, I made several pull requests to third-party libraries. For example, in Boost: https://github.com/boostorg/mpl/pull/90 https://github.com/boostorg/describe/pull/57 (fixed in https://github.com/boostorg/describe/commit/373db784111d6f5d2376b9e7ec36f7d207be290a) https://github.com/llvm/llvm-project/pull/166399 Adding -Wexpose-global-module-tu-local is a good thing. Because it allows you to continue developing the project while simultaneously PRing the problematic code. But I don't think you can ignore such a warning, at least for the reason you showed me.
