Disable this compile-time check in C. Indeed, the C implementation of
lttng_ust_is_pointer_type does not support opaque pointer types, because
it relies on pointer arithmetic.
Therefore, remove this check to keep supporting opaque pointers as
array/sequence elements in probe providers.
The worse that could happen is that users providing an unsupported
type as array/sequence element will end up with a meaningless integer
field.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I0fa170f7af7fc016027685e48076ebaf0366cc5b
};
#include LTTNG_UST_TRACEPOINT_INCLUDE
+#if defined(__cplusplus)
+
/*
* Stage 0.9.1
- * Verifying array and sequence elements are of an integer type.
+ * Verifying array and sequence elements are of an integer or pointer
+ * type.
+ *
+ * This compile-time check is only enabled in C++, because the C
+ * implementation of lttng_ust_is_pointer_type does not support opaque
+ * pointer types.
*/
/* Reset all macros within LTTNG_UST_TRACEPOINT_EVENT */
#include LTTNG_UST_TRACEPOINT_INCLUDE
+#endif
+
/*
* Stage 0.9.2 of tracepoint event generation.
*
* lttng_ust_is_pointer_type - check if type is a pointer
*
* Returns true if the type of @type is a pointer.
+ *
+ * Note: The C implementation of lttng_ust_is_pointer_type uses pointer
+ * arithmetic, which does not work on opaque pointer types.
*/
#if defined(__cplusplus)
#define lttng_ust_is_pointer_type(type) (std::is_pointer<type>::value)