diff --git a/docs/reference/glib/gvariant-varargs.xml b/docs/reference/glib/gvariant-varargs.xml
index 3f34d5336..550cea008 100644
--- a/docs/reference/glib/gvariant-varargs.xml
+++ b/docs/reference/glib/gvariant-varargs.xml
@@ -466,6 +466,7 @@
+
Note that in C, small integer types in variable argument lists are promoted up to int or unsigned int as appropriate, and
diff --git a/glib/gvariant-parser.c b/glib/gvariant-parser.c
index 128523c3b..7617f3498 100644
--- a/glib/gvariant-parser.c
+++ b/glib/gvariant-parser.c
@@ -2428,6 +2428,10 @@ g_variant_parse (const GVariantType *type,
* #GVariant pointer will be returned unmodified, without adding any
* additional references.
*
+ * Note that the arguments in @app must be of the correct width for their types
+ * specified in @format when collected into the #va_list. See
+ * the GVariant varargs documentation.
+ *
* In order to behave correctly in all cases it is necessary for the
* calling function to g_variant_ref_sink() the return result before
* returning control to the user that originally provided the pointer.
@@ -2481,6 +2485,10 @@ g_variant_new_parsed_va (const gchar *format,
* that case, the same arguments are collected from the argument list as
* g_variant_new() would have collected.
*
+ * Note that the arguments must be of the correct width for their types
+ * specified in @format. This can be achieved by casting them. See
+ * the GVariant varargs documentation.
+ *
* Consider this simple example:
* |[
* g_variant_new_parsed ("[('one', 1), ('two', %i), (%s, 3)]", 2, "three");
@@ -2530,6 +2538,10 @@ g_variant_new_parsed (const gchar *format,
* calling g_variant_new_parsed() followed by
* g_variant_builder_add_value().
*
+ * Note that the arguments must be of the correct width for their types
+ * specified in @format_string. This can be achieved by casting them. See
+ * the GVariant varargs documentation.
+ *
* This function might be used as follows:
*
* |[
diff --git a/glib/gvariant.c b/glib/gvariant.c
index e5f23c4be..93d227828 100644
--- a/glib/gvariant.c
+++ b/glib/gvariant.c
@@ -5168,6 +5168,21 @@ g_variant_valist_get (const gchar **str,
* 'r'; in essence, a new #GVariant must always be constructed by this
* function (and not merely passed through it unmodified).
*
+ * Note that the arguments must be of the correct width for their types
+ * specified in @format_string. This can be achieved by casting them. See
+ * the GVariant varargs documentation.
+ *
+ *
+ * MyFlags some_flags = FLAG_ONE | FLAG_TWO;
+ * const gchar *some_strings[] = { "a", "b", "c", NULL };
+ * GVariant *new_variant;
+ *
+ * new_variant = g_variant_new ("(t^as)",
+ * /* This cast is required. */
+ * (guint64) some_flags,
+ * some_strings);
+ *
+ *
* Returns: a new floating #GVariant instance
*
* Since: 2.24
@@ -5214,6 +5229,10 @@ g_variant_new (const gchar *format_string,
* @format_string, are collected from this #va_list and the list is left
* pointing to the argument following the last.
*
+ * Note that the arguments in @app must be of the correct width for their types
+ * specified in @format_string when collected into the #va_list. See
+ * the GVariant varargs documentation.
+ *
* These two generalisations allow mixing of multiple calls to
* g_variant_new_va() and g_variant_get_va() within a single actual
* varargs call by the user.
@@ -5365,6 +5384,10 @@ g_variant_get_va (GVariant *value,
* This call is a convenience wrapper that is exactly equivalent to
* calling g_variant_new() followed by g_variant_builder_add_value().
*
+ * Note that the arguments must be of the correct width for their types
+ * specified in @format_string. This can be achieved by casting them. See
+ * the GVariant varargs documentation.
+ *
* This function might be used as follows:
*
* |[