This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC PATCH] diagnose built-in declarations without prototype (PR 83656)


On 06/27/2018 08:40 PM, Martin Sebor wrote:
> On 06/27/2018 03:53 PM, Jeff Law wrote:
>> On 06/27/2018 09:27 AM, Jakub Jelinek wrote:
>>> On Wed, Jun 27, 2018 at 09:17:07AM -0600, Jeff Law wrote:
>>>>> About 115 tests fail due to incompatible declarations of
>>>>> the built-in functions below (the number shows the number
>>>>> of warnings for each functions):
>>>>>
>>>>> 428   abort
>>>>>  58   exit
>>>>>  36   memcpy
>>>>>  17   memmove
>>>>>  15   realloc
>>>>>  14   cabs
>>>>>   5   strncpy
>>>>>   4   strcmp
>>>>>   3   alloca
>>>>>   2   rindex
>>>>>   1   aligned_alloc
>>>> I'm supportive of this change.  Though I'm more worried about the
>>>> affects on the distros than I am on the testsuite (which I expected to
>>>> be in worse shape WRT this issue than your analysis indicates).
>>>
>>> I'm mainly worried about configure tests, those will be hit hardest by
>>> this and might result in silently turning off many features of the
>>> compiled
>>> programs.
>> It's certainly a concern.  Sadly, it's a hard one to deal with because
>> we can't just throw code at it and see what complains.  Instead we end
>> up with packages that don't configure in the appropriate features.
> 
> I checked all GCC's config logs and although there are 543
> instances of the -Wbuiltin-declaration-mismatch warning in
> an x86_64-linux build, none of them is an error and
> the number is the same as before the patch.
That's both depressing and promising at the same time.  Depressing
there's so many, promising that none trigger an error.

I wonder if stepping forward to a more modern version of autoconf is
going to help here and if we should be feeding them updates to make this
kind of stuff less pervasive, at least in standard autoconf tests.
jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]