This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51757] friend defined inside class and declared inside main linker error
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 05 Jan 2012 10:42:56 +0000
- Subject: [Bug c++/51757] friend defined inside class and declared inside main linker error
- Auto-submitted: auto-generated
- References: <bug-51757-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51757
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-01-05 10:42:56 UTC ---
Also, if there's no definition, why would it link when -fkeep-inline-functions
is used? My guess would be that the call in main doesn't mark the inline
function as used, so it is not emitted.
For the record, Solaris CC fails in the same way, it links OK with clang++