ffs((uint8_t)x) and ffs((uint16_t)x) generate a call to __ffshi2, but this function does not exist in libgcc.a, giving the error undefined reference to `__ffshi2'.
Test case: int main(int argc) { return ffs(argc); } -- Summary: ffs builtin calls undefined __ffshi2 Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: sjackman at gmail dot com GCC target triplet: avr http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34210