, depending on the compiler and used optimization level, the compiler may interpret the conditional as always true (because func can be seen as undefined from a standards point of view) [REF].
The weak function attribute is supposed to be used on function declarations.