This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: expected_retval attribute proposal
>
> I agree. In fact, as the putc/getc[1] macros are basically
> need_more_buffer_p ? fill_buffer () : *buffer[pos++]
I tought these are actually functions in glibc implementation because
of threads... ok probably I am wrong..
>
> IMO, for {un}expected return value to be useful, it must be determined
> automatically (like profiling), and therefore apply to all functions.
> How that is achieved is difficult I guess :-)
In case we do profiling, it is easiest to predict the branches IMO.
Honza