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: Putting target-dependent global state into switchable structures


Mike Stump <mikestump@comcast.net> writes:
> On Aug 23, 2012, at 1:30 PM, Richard Sandiford wrote:
>>> ../../gcc/gcc/target-globals.c: In function âtarget_globals* save_target_globals()â:
>>> ../../gcc/gcc/target-globals.c:69:33: error: âggc_alloc_target_globalsâ was not declared in this scope
>>> make: *** [target-globals.o] Error 1
>>> 
>>> after the switch to C++.  I was wondering if your switchable target port compiles post the switch to C++?
>> 
>> Yeah, mips64-elf with today's trunk seems OK.
>
> So, where is the prototype for this function?  a grep seems not to
> find it.  Possibly my compiler is pickier than yours, I'm using g++
> 4.5.1 apparently.

It's supposed to be in gtype-desc.h (which is generated automatically).

#define ggc_alloc_target_globals() ((struct target_globals *)(ggc_internal_alloc_stat (sizeof (struct target_globals) MEM_STAT_INFO)))

That in turn gets pulled in via ggc.h.

Richard


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