Skip to content

Commit f7239a7

Browse files
authored
Declare nullptr_t ourselves. (#80)
See GCC bug #114869 [0] -- the nullptr_t type is not actually specified as being built-in. This is the way it's now declared in gcc's stddef.h. [0]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114869 Signed-off-by: Amy Ringo <me@remexre.com>
1 parent 2308119 commit f7239a7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/kernel/include/types.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ static_assert(sizeof(uaddr) == __SIZEOF_SIZE_T__, "incorrect size for uaddr");
8484
static_assert(alignof(uaddr) == __SIZEOF_SIZE_T__,
8585
"incorrect alignment for uaddr");
8686

87+
/**
88+
* The type of null pointers.
89+
*/
90+
91+
typedef typeof(nullptr) nullptr_t;
92+
8793
/**
8894
* Strict provenance functions. See [0] for more details, but these are
8995
* basically APIs for doing "funny things" to pointers that compile better on

0 commit comments

Comments
 (0)