### Function Macro

# GLib GNUC_PRINTF

#### Declaration [src]

    #define G_GNUC_PRINTF (
      format_idx,
      arg_idx
    )

#### Description [src]

Expands to the GNU C `format` function attribute if the compiler is gcc. This is used for declaring functions which take a variable number of arguments, with the same syntax as `printf()`. It allows the compiler to type-check the arguments passed to the function.

Place the attribute after the function declaration, just before the semicolon.

See the GNU C documentation for more details.

    gint g_snprintf (gchar  *string,
                     gulong       n,
                     gchar const *format,
                     ...) G_GNUC_PRINTF (3, 4);

This function is not directly available to language bindings.

#### Parameters

`format_idx`

  Type: `-`

  The index of the argument corresponding to the format string (the arguments are numbered from 1).

`arg_idx`

  Type: `-`

  The index of the first of the format arguments, or 0 if there are no format arguments.