__GXX_WEAK__ broken

Mark Mitchell mark@codesourcery.com
Sat Jul 7 10:29:00 GMT 2001


--On Thursday, July 05, 2001 07:52:28 AM +0100 Neil Booth 
<neil@daikokuya.demon.co.uk> wrote:

> Mark,
>
> In cppinit.c we have
>
>       if (SUPPORTS_ONE_ONLY)
> 	_cpp_define_builtin (pfile, "__GXX_WEAK__ 1");
>       else
> 	_cpp_define_builtin (pfile, "__GXX_WEAK__ 0");
>
> Any good ideas?

I'm catching up after a couple of days of email; sorry.

My instinct would be to say that CPP needs to link against the target
object now.  Or, that you could divide that object into a generic
part (usable in cpplib, the driver, etc.) and a specific part for
the compiler.  In fact, that is probably the natural inheritance
relationship we were looking for earlier.

  struct target {
    /* Stuff that does not involve `tree' or `rtl'.
  };

  struct compiler_target {
    struct target base;
    /* Stuff that does involve trees.  */
  };

Then, if there were stuff that only mattered in cpplib, you could make
a `preprocessor_target' as well.

-- 
Mark Mitchell                mark@codesourcery.com
CodeSourcery, LLC            http://www.codesourcery.com



More information about the Gcc-bugs mailing list