On Sat, Oct 05, 2019 at 08:28:26AM +0000, Bernd Edlinger wrote:
> On 10/5/19 9:26 AM, Segher Boessenkool wrote:
> > On Fri, Oct 04, 2019 at 02:26:26PM -0600, Jeff Law wrote:
> > To get 95% of the benefit for only 2% of the pain, you can make an inline
> > function where there was a macro before, and define that same macro to
> > just call the function.

> Hmm, I tried this but it does not work:

[ snip ]

> In file included from ./tm.h:30:0,
>                  from ../../gcc-trunk/gcc/gencheck.c:23:
> ../../gcc-trunk/gcc/config/elfos.h: In function ‘void 
> elfos_asm_declare_object_name(FILE*, const char*, tree)’:
> ../../gcc-trunk/gcc/config/elfos.h:324:51: error: ‘DECL_ONE_ONLY’ was not 
> declared in this scope

So not everything including elfos.h (via tm.h perhaps) includes tree.h
first, but this macro / function requires that, and as function that is
a compilation error.

So maybe this macro / function should move to some header that isn't
included everywhere, if it accesses stuff that isn't defined in all
places?

Or maybe it is best to make this a real hook, move the implementation to
a .c that actually includes the headers it needs ;-)

(elfos.h is kind of special, it is included via tm.h, this is set up in
config.gcc).

> Now I don't know how to fix that easily.

Yeah me neither.  Pity.


Segher

Reply via email to