bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lib/malloca.c: warning about [-Wsign-compare]


From: Paul Eggert
Subject: Re: lib/malloca.c: warning about [-Wsign-compare]
Date: Wed, 21 Sep 2022 17:15:50 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1

On 9/21/22 14:42, Bjarni Ingi Gislason wrote:

you do not say for what you want (need) all this data.

We need a reproducer to figure out what is causing the problem. Perhaps the problem involves something going wrong and generating the wrong config.h or Makefile. If so, what is it?


   If your are seeking a reproducer this works for me:

   Compilation in your gnulib directory:

clang -I . -Wsign-compare -c lib/malloca.c

with ./config.h coming from the attachment (compressed file).

Sorry, that's not a reproducer. First, if the problem is that the config.h is wrong, this won't tell us why config.h went wrong. Second, if the problem is in the Makefile this won't show it to us. Third, even if I simply put that config.h in my gnulib directory and run that command, it won't compile for me (Fedora 36 x86-64, which has clang 14.0.5 (Fedora 14.0.5-1.fc36)):

$ clang -I . -Wsign-compare -c lib/malloca.c
lib/malloca.c:24:10: fatal error: 'stdckdint.h' file not found
#include <stdckdint.h>
         ^~~~~~~~~~~~~

We need a complete reproducer from scratch, not just dribs and drabs. If it's too much work for you to generate one that's OK, we can wait until someone else runs into the issue, whatever it is.

Here's the shell command that I used to try to reproduce the problem on Fedora 36 x86-64, from a fresh Gnulib checkout. This shell command succeeded for me. Can you alter this recipe so that I can easily reproduce the problem with an altered recipe, so that the test fails?

  CC=clang ./gnulib-tool --test malloca




reply via email to

[Prev in Thread] Current Thread [Next in Thread]