Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-64650

src/mongo/util/ctype.h is missing dependency on uint16_t

    • Server Programmability
    • ALL
    • Hide

      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

      Show
      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
    • 53

      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>` 

       

            Assignee:
            Unassigned Unassigned
            Reporter:
            anna.wawrzyniak@mongodb.com Anna Wawrzyniak
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: