From 983b56e9f7ef1fdfcf82ad82cc70f939318e599f Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Wed, 19 Jan 2022 22:59:13 -0800 Subject: Add _Static_assert when compiling server and user stubs. This is only done when data is inlined with a concrete size. It ensures the C and Mig types have the same size in the target arch. Tested by building the hurd package. No assertions were triggered. Message-Id: --- tests/good/case.defs | 6 ++++-- tests/includes/types.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/good/case.defs b/tests/good/case.defs index 25ba510..479f733 100644 --- a/tests/good/case.defs +++ b/tests/good/case.defs @@ -19,9 +19,11 @@ /* Tests some keywords with different casing. */ SUBSYSTEM myroutine 100; -TyPe int = MACH_MSG_TYPE_INTEGER_64; +import ; + +TyPe uint64_t = MACH_MSG_TYPE_INTEGER_64; typE mach_port_t = MACH_MSG_TYPE_COPY_SEND; RouTine factorial(port : mach_port_t; n : int; - out result : int); + out result : uint64_t); diff --git a/tests/includes/types.h b/tests/includes/types.h index c8c3afd..fe70e69 100644 --- a/tests/includes/types.h +++ b/tests/includes/types.h @@ -28,7 +28,7 @@ typedef struct char_struct { char c4; } char_struct_t; -typedef char* string_t; +typedef char string_t[256]; typedef const char* const_string_t; static inline int8_t int_to_int8(int n) { -- cgit v1.2.3