[SERVER-64650]  src/mongo/util/ctype.h is missing dependency on uint16_t Created: 18/Mar/22  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Anna Wawrzyniak Assignee: Backlog - Service Architecture
Resolution: Unresolved Votes: 0
Labels: sa-remove-fv-backlog-22
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
Assigned Teams:
Service Arch
Operating System: ALL
Steps To Reproduce:

Empty .cpp file with just

#include "src/mongo/util/ctype.h"

results on v4gcc in:

 [2022/03/17 21:40:19.736] Command execution time: build/cached/mongo/db/exec/sbe/sbe_test.o: 0.254931 seconds [2022/03/17 21:40:19.803] In file included from src/mongo/db/exec/sbe/util/print_options.h:33, [2022/03/17 21:40:19.803] from src/mongo/db/exec/sbe/values/write_value_to_stream_test.cpp:34: [2022/03/17 21:40:19.803] src/mongo/util/ctype.h:75:15: error: found ':' in nested-name-specifier, expected '::' [2022/03/17 21:40:19.803] 75 | enum ClassBit : uint16_t { [2022/03/17 21:40:19.803] | ^ [2022/03/17 21:40:19.803] | :: [2022/03/17 21:40:19.803] src/mongo/util/ctype.h:75:6: error: 'ClassBit' has not been declared [2022/03/17 21:40:19.803] 75 | enum ClassBit : uint16_t { [2022/03/17 21:40:19.803] | ^~~~~~~~ [2022/03/17 21:40:19.803] src/mongo/util/ctype.h:75:26: error: expected unqualified-id before '{' token [2022/03/17 21:40:19.803] 75 | enum ClassBit : uint16_t { [2022/03/17 21:40:19.803] | ^ [2022/03/17 21:40:19.803] src/mongo/util/ctype.h:91:11: error: 'uint16_t' does not name a type [2022/03/17 21:40:19.803] 91 | constexpr uint16_t calculateClassBits(unsigned char c) { [2022/03/17 21:40:19.803] | ^~~~~~~~ [2022/03/17 21:40:19.803] src/mongo/util/ctype.h:70:1: note: 'uint16_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'? [2022/03/17 21:40:19.803] 69 | #include <array> [2022/03/17 21:40:19.803] +++ |+#include <cstdint> [2022/03/17 21:40:19.803] 70 |

See https://jira.mongodb.org/browse/BF-24654 for actual build failure

Participants:
Linked BF Score: 53

 Description   

src/mongo/util/ctype.h appears to not be self-contained and has dependency on uint16_t that it does not by itself include.

Its possibly just missing a `#include <cstdint>` 

 


Generated at Thu Feb 08 06:00:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.