[Bug c/70742] Support div as a builtin
joseph at codesourcery dot com
gcc-bugzilla@gcc.gnu.org
Fri Apr 22 21:30:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70742
--- Comment #12 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
A script that assumes build = host = target is obviously unacceptable.
You can't do any compilations for $target at all when configuring GCC,
only when configuring its runtime libraries such as libgcc, because there
may not be a pre-existing compiler for $target at all. You can grep
target headers if they are available at configure time, but that's all,
and they may not be available.
I think you'd need to defer associating a declaration with a built-in
function until after the declaration of div in a system header has been
seen, at which point you have the header's declaration of div_t available
(ISO C doesn't allow calling div without including the header that
declares it). This delayed declaration does of course make it different
from all existing built-in functions.
More information about the Gcc-bugs
mailing list