It also eliminates the need of having to document that the function would invoke undefined behavior if nullptrs are passed in.
It also eliminates some branches in, or if the called function (assuming it was testing if any parameter is nullptr), it eliminates onw or more branches.
Note that this feature is not usable for return values, local variables, or for functions like memcpy() because arrays of void are illegal, or for return values. A GCC extension, __attribute__((nonnull)) allows parameters to be marked as nonnull. This extension is also supported by Intel's compiler and Clang. A Clang extension allows _Nullable, _Nonnull and _Null_unspecified. This extension is not supported by GCC. A GCC extension, __attribute__((returns_nonnull)) can be used to specify that a function returns a nonnull value. This extension is also supported by Clang and Intel's compiler. I await an _Optional type in the next revision of the C Standard. There are already some proposals for it.
Note that I have changed sizeof (ac_node_t) to sizeof *node. In the case that node was changed to some other type, you would not require a similar change in the calloc() call. This eases maintainence.
Portability:
From the Linux man page:
HISTORY top
<sys/queue.h> macros first appeared in 4.4BSD.
NOTES top
Some BSDs provide SIMPLEQ instead of STAILQ. They are identical,
but for historical reasons they were named differently on
different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ
originated on NetBSD. For compatibility reasons, some systems
provide both sets of macros. glibc provides both STAILQ and
SIMPLEQ, which are identical except for a missing SIMPLEQ
equivalent to STAILQ_CONCAT().
It should be enough to define _BSD_SOURCE for sys/queue.h. Compiling with -std=gnu17 should not be necessary
Some compile-time detection is required to use the proper macros provided by an implementation. As the man page says, some BSDs provide SIMPLEQ instead of STAILQ.
To add to @J_H's "braces" point, see: Apple's SSL/TLS bug.
And do not comment the obvious. Though I don't see why you need the extra variable w, insert_word(root, words[i]) should suffice.