bug-m4
[Top][All Lists]
Advanced

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

Re: Compiled gnu-m4 failed


From: Eric Blake
Subject: Re: Compiled gnu-m4 failed
Date: Tue, 3 Oct 2023 10:35:54 -0500
User-agent: NeoMutt/20230517

On Tue, Oct 03, 2023 at 10:34:48PM +0800, 安阳 wrote:
> Hi,I'm doing "linux from scratch"  recently. I got an error when compiled
> m4.
> [image: 企业微信截图_16963434298603.png]
> gcc version is 13.2.1。Can you help me fix the error。Thanks very much

Posting a screenshot instead of a text paste does not help people who
read your email in plain text mode.  Reproducing the relevant part of
your image here:

  CC       output.o
output.c: In function 'make_room_for':
output.c:488:40: error: potential null pointer dereference 
[-Werror=null-dereference]
  488 |       output_file = output_diversion->u.file;
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
cc1: all warnings being treated as errors

Thanks for the report.  If you don't mind ignoring the warning, you
can disable -Werror in your CFLAGS and see if the just-built m4 passes
its testsuite.

If it is a real bug, it's in a corner case not covered by the
testsuite, so any patch to such an issue should also enhance the
testsuite.  If it is instead a false negative, there may be a way to
add an assertion to the code that will silence the compiler; and we
would instead suggest reporting a bug against gcc for the diagnostic.
But until I reproduce it and study the code further, I'm not yet in a
position to say whether the fault is in m4 or in gcc.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org




reply via email to

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