gcc-6 issues a "used but never defined" warning for functions which are
declared, never defined, and used only in contexts which are later
deleted by the optimizer. If the function were actually used, the link
would fail. Switch to a complicated mechanism to define the function
while keeping it out of line so that __attribute__((__error__)) is
triggered as intended.