Closed
[Bug-Report|缺陷反馈]: pre_def.h missing <cstdint> causes compilation failure after GCC upgrade #3172
hsqnbAdd on Aug 31Closed at Sep 3
Aug 31 Associated pull request
Aug 31 Assign hsqnb as responsible person
Sep 1 changed custom state from 待办的 to 已完成
Sep 1 Close issue
Sep 1 Added label: resolved
Sep 2 changed custom state from 已完成 to 待办的
Sep 2 Reopen issue
Sep 2 Associated pull request
Sep 3 Close issue
Describe the current behavior / 问题描述 (Mandatory / 必填)
After upgrading GCC, compiling
framework/src/interface/inner/pre_def.hfails becauseuint8_t(used by theBinDataPtrtypedef on line 38) is not defined. The newer GCC no longer transitively includes<cstdint>through other headers (e.g.<vector>/<memory>), so the definition ofuint8_tis missing, causing a build break on strict toolchains.Environment / 环境信息 (Mandatory / 必填)
Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)
pre_def.herror: 'uint8_t' does not name a typeatBinDataPtr = uint8_t*;Describe the expected behavior / 预期结果 (Mandatory / 必填)
pre_def.hshould compile successfully by explicitly including<cstdint>so thatuint8_tis always defined regardless of whether other headers transitively include it.Related log / screenshot / 日志 / 截图 (Mandatory / 必填)
framework/src/interface/inner/pre_def.h:38:18: error: 'uint8_t' does not name a type
38 | using BinDataPtr = uint8_t*;
| ^ ~~~~~~~