Re: Fix some "call to function ... through pointer to incorrect function type" errors
Collin Funk <[email protected]>
| Newsgroups | gmane.comp.lib.gnulib.bugs |
|---|---|
| Message-ID | <[email protected]> |
Bruno Haible via Gnulib discussion list <[email protected]> writes: > After upgrading the CI to use a newer clang for the check with sanitizers, > I see a couple of runtime errors: > > > FAIL: test-map-c++ > ================== > > ../../gllib/gl_array_map.c:90:17: runtime error: call to function streq through pointer to incorrect function type 'bool (*)(const void *, const void *)' > /home/runner/work/ci-testdir-check/ci-testdir-check/testdir-all/build/gllib/./string.h:1369: note: streq defined here > SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../gllib/gl_array_map.c:90:17 > FAIL test-map-c++ (exit status: 134) Thanks. I don't think GCC complains about this, right? As far as I am aware it works fine on every reasonable platform, much like casting a void pointer to a function type and calling it. Collin