[Bug c/96907] [docs] document builtins for fputc and putc

2020-09-14 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96907

Martin Sebor  changed:

   What|Removed |Added

 CC||msebor at gcc dot gnu.org

--- Comment #6 from Martin Sebor  ---
Rather than en enumerating all the functions that are handled as built-ins (and
keeping them in sync with the code) it would be simpler to state that any
function prescribed by this or that revision of a standard may be implemented
as a built-in, and suggesting to use the __has_builtin() preprocessor function
to query support for each.

Besides adding attributes to their declarations, GCC transforms calls to some
of them into others (e.g., fputs to fputc, or fprintf to fputs or fputc) or
eliminated altogether (e.g., fputs("", f)).  It might be helpful to mention
that in the manual and point users who want to avoid such transformations to
-fno-builtin-.

[Bug c/96907] [docs] document builtins for fputc and putc

2020-09-10 Thread ndesaulniers at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96907

--- Comment #5 from Nick Desaulniers  ---
No preferences either way.  I was just comparing differences between compilers
for __has_builtin and noticed GCC returns true for those two.  Is that ok?

[Bug c/96907] [docs] document builtins for fputc and putc

2020-09-10 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96907

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek  ---
For various builtins it isn't merely about default attached attributes, but
also about the compiler understanding what the function does in more detail and
perhaps performing some optimizations on them, transform one function call into
another one, or understand some aliasing etc. behavior of it.
I'm not really sure it is a good idea to document it all.

[Bug c/96907] [docs] document builtins for fputc and putc

2020-09-10 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96907

Segher Boessenkool  changed:

   What|Removed |Added

 CC||segher at gcc dot gnu.org

--- Comment #3 from Segher Boessenkool  ---
Many other "builtins" documented there are only ever implemented with
libcalls as well?

[Bug c/96907] [docs] document builtins for fputc and putc

2020-09-03 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96907

--- Comment #2 from Richard Biener  ---
They are not really "builtins", they are merely present to have default
attributes attached to them.

[Bug c/96907] [docs] document builtins for fputc and putc

2020-09-02 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96907

--- Comment #1 from Andrew Pinski  ---
putc was added by g-b53b5aa509

fputc has been there since before 2003.