harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Elford, Chris L" <chris.l.elf...@intel.com>
Subject RE: [build] HWA doesn't work
Date Thu, 30 Nov 2006 17:58:57 GMT
I can't provide a perfect example for this exact scenario but I can say
that I have seen crossplatform inlining [and other C++ variations]
requiring code modification in the past.  In this case, definitely, at
first glance, it appears that external linkage should be provided for
the function.  Does the .obj file have an external linkage version of
the method in it?  It is possible though unlikely that the compiler
somehow determines that all uses in the compilation unit are internal.

The common case that will involve compiler to compiler differences would
be on inlined methods that are not invoked within the compilation unit
such as below.  Note that this is not [at least in an obvious way] the
what is going on in this JIRA:
B.h  : void foo();
B.cpp: inline foo() {}         // defines foo but does not invoke it
A.cpp: void main() { foo(); }  // invokes foo but does not define it
May result in a missing symbol if B.cpp does not invoke foo too because
the compiler determines that all uses are internal.

See http://www.mail-archive.com/bug-gnulib@gnu.org/msg04321.html for a
nice extraction from the ANSI spec regarding inline directives and some
of the issues that can arise.  I don't think any of the examples there
match this exact case.


Chris Elford
Intel SSG/Enterprise Solutions Software Division

-----Original Message-----
From: Mikhail Fursov [mailto:mike.fursov@gmail.com] 
Sent: Thursday, November 30, 2006 9:30 AM
To: dev@harmony.apache.org; geir@pobox.com
Subject: Re: [build] HWA doesn't work

On 11/30/06, Geir Magnusson Jr. <geir@pobox.com> wrote:
> I absolutely don't understand how you can claim a "hint" like "inline"
> can be considered a bug in the source when the sourcebase is being
> compiled by the same compiler.  can you explain?
> The only logical reason I can find is a miscommunication between
and linker.

Mikhail Fursov

View raw message