lib/sourcelocation.h: add missing <cstdint> include#4474
lib/sourcelocation.h: add missing <cstdint> include#4474firewave merged 1 commit intocppcheck-opensource:mainfrom trofi:gcc-13-fix
Conversation
|
Thanks for your contribution. Strange. I just did a run of include-what-you-use and that didn't come up. I just tested it with a reduced case and it is being reported. Something to look into. We should only include it when needed. But that can be adjusted in later changes. |
|
I'm not sure how Why it came up only now: in |
|
Oh, I probably misumderstood your comment about "when needed". I'll move the header under: |
Without the change build on upcoming gcc-13 fails as:
In file included from lib/symboldatabase.h:28,
from lib/astutils.h:36,
from test/testastutils.cpp:20:
lib/sourcelocation.h:52:10: error: 'uint_least32_t' in namespace 'std' does not name a type
52 | std::uint_least32_t m_line = 0;
| ^~~~~~~~~~~~~~
|
Moved |
Yeah - that's what I meant. Thanks!
It's a limitation of include-what-you-use: include-what-you-use/include-what-you-use#1035. Fortunately just recently CMake added a feature which allows us to handle it.
We came across this multiple times in the past which is why older versions of Cppcheck cannot be built with the latest toolchains. But we no longer rely on transitive includes (apparently we still do) so it should be better now. |
Without the change build on upcoming gcc-13 fails as: