bug-binutils
[Top][All Lists]
Advanced

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

[Bug gas/29320] New: [gas] gas/app.c: -Werror, 'struct obstack' declared


From: pexu at sourceware dot mail.kapsi.fi
Subject: [Bug gas/29320] New: [gas] gas/app.c: -Werror, 'struct obstack' declared inside parameter list
Date: Tue, 05 Jul 2022 10:45:20 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=29320

            Bug ID: 29320
           Summary: [gas] gas/app.c: -Werror, 'struct obstack' declared
                    inside parameter list
           Product: binutils
           Version: 2.39 (HEAD)
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gas
          Assignee: unassigned at sourceware dot org
          Reporter: pexu at sourceware dot mail.kapsi.fi
  Target Milestone: ---

Hi.

I recent [1] obstack commit unfortunately causes compile error with -Werror
when using gas/as.h:

In file included from <...>/binutils/gas/app.c:27:
<...>/binutils/gas/as.h:479:28: error: 'struct obstack' declared inside
parameter list will not be visible outside of this definition or declaration
[-Werror]
  479 | void   subsegs_end (struct obstack **);

I presume this is easily fixed by adding a struct obstack forward declaration
directly to directly to gas/as.h.

Struct obstack forward declaration is also used by gas/frags.h, but that
doesn't include anything else so e.g. adding struct obstack forward declaration
to libiberty.h wouldn't be highly beneficial.

[1]
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=eeeaf705fe1c94e9330fa222d7928a9d0f03832a

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

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