Re: Unused GCC builtins

2018-01-27 Thread Martin Sebor
On 01/24/2018 07:09 AM, Jakub Jelinek wrote: On Wed, Jan 24, 2018 at 03:04:55PM +0100, Manuel Rigger wrote: In a second step, we also considered internal builtins and found that the vararg handling builtins (__builtin_va_start, __builtin_va_end, __builtin_va_arg, and __builtin_va_copy) are

Re: Unused GCC builtins

2018-01-24 Thread Florian Weimer
* Jakub Jelinek: > On Wed, Jan 24, 2018 at 03:04:55PM +0100, Manuel Rigger wrote: >> In a second step, we also considered internal builtins and found that the >> vararg handling builtins (__builtin_va_start, __builtin_va_end, >> __builtin_va_arg, and __builtin_va_copy) are relied upon by many

Re: Unused GCC builtins

2018-01-24 Thread Jakub Jelinek
On Wed, Jan 24, 2018 at 03:04:55PM +0100, Manuel Rigger wrote: > In a second step, we also considered internal builtins and found that the > vararg handling builtins (__builtin_va_start, __builtin_va_end, > __builtin_va_arg, and __builtin_va_copy) are relied upon by many projects, > even though

Re: Unused GCC builtins

2018-01-24 Thread Manuel Rigger
Thank you for all answers, which are very useful for us! As you pointed out, we only considered GitHub projects. If I understood correctly, builtins would still not be deprecated even if we considered all other open-source hosting sites because closed-source projects could still rely on them,

Re: Unused GCC builtins

2018-01-22 Thread Florian Weimer
* Manuel Rigger: > Details: We downloaded all C projects from GitHub that had more than 80 > GitHub stars, which yielded almost 5,000 projects with a total of more > than one billion lines of C code. We filtered GCC, forks of GCC, and > other compilers as we did not want to incorporate internal

Re: Unused GCC builtins

2018-01-22 Thread Andrew Pinski
On Mon, Jan 22, 2018 at 7:55 AM, David Brown wrote: > On 22/01/18 16:46, Manuel Rigger wrote: >> Hi everyone, >> >> As part of my research, we have been analyzing the usage of GCC builtins >> in 5,000 C GitHub projects. One of our findings is that many of these >> builtins

Re: Unused GCC builtins

2018-01-22 Thread Jakub Jelinek
On Mon, Jan 22, 2018 at 04:55:42PM +0100, David Brown wrote: > Many of these are going to be used automatically by the compiler. You > write "strdup" in your code, and the compiler treats it as > "__builtin_strdup". I don't know that such functions need to be > documented as extensions, but they

Re: Unused GCC builtins

2018-01-22 Thread Joel Sherrill
On 1/22/2018 9:55 AM, David Brown wrote: On 22/01/18 16:46, Manuel Rigger wrote: Hi everyone, As part of my research, we have been analyzing the usage of GCC builtins in 5,000 C GitHub projects. One of our findings is that many of these builtins are unused, even though they are described in

Re: Unused GCC builtins

2018-01-22 Thread David Brown
On 22/01/18 16:46, Manuel Rigger wrote: > Hi everyone, > > As part of my research, we have been analyzing the usage of GCC builtins > in 5,000 C GitHub projects. One of our findings is that many of these > builtins are unused, even though they are described in the documentation > (see