This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Undefined external in test g++.pt/ptrmem2.C
- To: sje at cup dot hp dot com
- Subject: Re: Undefined external in test g++.pt/ptrmem2.C
- From: Jason Merrill <jason_merrill at redhat dot com>
- Date: 15 Jun 2001 12:47:06 +0100
- Cc: gcc-patches at gcc dot gnu dot org
- References: <200106142213.PAA02650@hpsje.cup.hp.com>
>>>>> "Steve" == Steve Ellcey <sje@cup.hp.com> writes:
> I have a proposed change to the test g++.old-deja/g++.pt/ptrmem2.C.
> This test fails on my platform (IA64 HP-UX) because we need to generate
> an external statement for globals (functions in particular) in order to
> use the HP linker and g++ does so via assemble_external. So g++
> generates an external statement for the function S::h but this function
> is never defined (or called), thus we fail to link. My proposed fix is
> to define S::h. The other option would be to modify GCC to only call
> assemble_external when we see a call to the function, not when we see a
> definition, but I don't know if that is practical or not.
Since S::h is used (in the defintion of S::k), strictly speaking it must be
defined.
> Any comments? If it looks good can someone check it in?
Done.
Jason