Merge from trunk: fixes #7814 (fixed some numeric to numeric conversions bugs, workaround warnings, -ftrapv now does not triggers coredump)