[Bug c++/38392] Template friend function injection

2010-05-03 Thread jason at gcc dot gnu dot org
--- Comment #22 from jason at gcc dot gnu dot org 2010-05-04 04:54 --- Fixed for 4.6. -- jason at gcc dot gnu dot org changed: What|Removed |Added

[Bug c++/38392] Template friend function injection

2010-04-07 Thread jason at gcc dot gnu dot org
--- Comment #21 from jason at gcc dot gnu dot org 2010-04-07 15:55 --- Subject: Bug 38392 Author: jason Date: Wed Apr 7 15:54:42 2010 New Revision: 158073 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158073 Log: PR c++/38392 * pt.c (tsubst_friend_function):

[Bug c++/38392] Template friend function injection

2009-12-25 Thread paolo dot carlini at oracle dot com
--- Comment #16 from paolo dot carlini at oracle dot com 2009-12-25 09:53 --- As Jason confirmed, this is not a regression, thus, post 4.5.0. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38392

[Bug c++/38392] Template friend function injection

2009-12-25 Thread H9XLrv5oXVNvHiUI at spambox dot us
--- Comment #17 from H9XLrv5oXVNvHiUI at spambox dot us 2009-12-25 10:42 --- Ok I managed to compile GCC 4.5, applied the patch and compiled the test code above and everything works fine. Thanks again! And yes, I imagined it would have been post 4.5 but I meant 'when' from a time frame

[Bug c++/38392] Template friend function injection

2009-12-25 Thread paolo dot carlini at oracle dot com
--- Comment #18 from paolo dot carlini at oracle dot com 2009-12-25 10:48 --- If I were you, I would not use this kind of C++ at all, for the time being. As we discussed already, it's *very* weakly supported and your software would not be portable. --

[Bug c++/38392] Template friend function injection

2009-12-25 Thread H9XLrv5oXVNvHiUI at spambox dot us
--- Comment #19 from H9XLrv5oXVNvHiUI at spambox dot us 2009-12-25 11:02 --- Yeah I know, but consider that I used this code only in a specific circumstance and does not constitute a core part of my application (or a foundation of some higher level mechanism). And I know it's a lot

[Bug c++/38392] Template friend function injection

2009-12-25 Thread paolo dot carlini at oracle dot com
--- Comment #20 from paolo dot carlini at oracle dot com 2009-12-25 11:06 --- Then wait, good luck -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38392

[Bug c++/38392] Template friend function injection

2009-12-24 Thread H9XLrv5oXVNvHiUI at spambox dot us
--- Comment #9 from H9XLrv5oXVNvHiUI at spambox dot us 2009-12-24 14:48 --- I know if you move the function it links (btw your link asks me for an HTTP login), but if you follow the discussion in the newsgroup it was concluded that this (the above) is actually perfectly valid standard

[Bug c++/38392] Template friend function injection

2009-12-24 Thread paolo dot carlini at oracle dot com
--- Comment #10 from paolo dot carlini at oracle dot com 2009-12-24 15:39 --- Try this one: http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#329 Anyway, if you could point us to the specific sentence in the thread saying that it's legal, it would be useful. And, well,

[Bug c++/38392] Template friend function injection

2009-12-24 Thread H9XLrv5oXVNvHiUI at spambox dot us
--- Comment #11 from H9XLrv5oXVNvHiUI at spambox dot us 2009-12-24 17:23 --- This is possibly the part in which gets confirmed that the code is standard compliant, although it reports the exact same paragraph you linked (the old version):

[Bug c++/38392] Template friend function injection

2009-12-24 Thread jason at gcc dot gnu dot org
-- jason at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |jason at gcc dot gnu dot org |dot org

[Bug c++/38392] Template friend function injection

2009-12-24 Thread jason at gcc dot gnu dot org
--- Comment #12 from jason at gcc dot gnu dot org 2009-12-24 21:48 --- Created an attachment (id=19387) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19387action=view) patch Here's a fix. I'm going to hold off on applying it for now since it isn't a regression. --

[Bug c++/38392] Template friend function injection

2009-12-24 Thread paolo dot carlini at oracle dot com
--- Comment #13 from paolo dot carlini at oracle dot com 2009-12-24 21:55 --- Cool. Should the testcase use dg-do link? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38392

[Bug c++/38392] Template friend function injection

2009-12-24 Thread jason at gcc dot gnu dot org
--- Comment #14 from jason at gcc dot gnu dot org 2009-12-24 22:14 --- Ah, good point. I've updated the patch accordingly in my local pre-4.6 git branch. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38392

[Bug c++/38392] Template friend function injection

2009-12-24 Thread H9XLrv5oXVNvHiUI at spambox dot us
--- Comment #15 from H9XLrv5oXVNvHiUI at spambox dot us 2009-12-24 22:15 --- Hey thank you! I'd like to test the patch if I only I'd be able to compile 4.5 successfully. You have any idea on when could this patch make it to a final release? --

[Bug c++/38392] Template friend function injection

2009-12-23 Thread redi at gcc dot gnu dot org
--- Comment #8 from redi at gcc dot gnu dot org 2009-12-23 11:02 --- See http://www.open-std.org/jtc1/sc22/wg21/prot/14882fdis/cwg_defects.html#329 I believe a use of the function must come after the definition for it to be instantiated, indeed if I add this after the explicit

[Bug c++/38392] Template friend function injection

2009-12-22 Thread H9XLrv5oXVNvHiUI at spambox dot us
--- Comment #6 from H9XLrv5oXVNvHiUI at spambox dot us 2009-12-22 21:52 --- Did anyone try this against 4.5? Considering that at this stage only bugfixes are accepted in the codebase for the next release I'd really like to see a possible fix to this in. I tried to compile GCC 4.5 on my

[Bug c++/38392] Template friend function injection

2009-12-22 Thread paolo dot carlini at oracle dot com
--- Comment #7 from paolo dot carlini at oracle dot com 2009-12-22 22:15 --- Doesn't link with 4.5.0. And doesn't link with ICC and SunStudio either, thus, I'm rather skeptical it should. I also skimmed quickly through the discussion on comp.lang.c++ and didn't notice any neat

[Bug c++/38392] Template friend function injection

2009-09-15 Thread H9XLrv5oXVNvHiUI at spambox dot us
--- Comment #5 from H9XLrv5oXVNvHiUI at spambox dot us 2009-09-15 07:37 --- Any update about this? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38392

[Bug c++/38392] Template friend function injection

2009-01-31 Thread H9XLrv5oXVNvHiUI at spambox dot us
--- Comment #3 from H9XLrv5oXVNvHiUI at spambox dot us 2009-01-31 20:28 --- Sorry for the late reply! I thought I'd receive an e-mail when one of my reports gets updated, silly me. Yes I know it works if you switch the order, but that's exactly the point of the code, to have them in

[Bug c++/38392] Template friend function injection

2009-01-31 Thread bangerth at gmail dot com
--- Comment #4 from bangerth at gmail dot com 2009-02-01 05:07 --- Confirmed indeed, with this (linker) error message: g/x c++ x.cc /tmp/ccjPvb3J.o: In function `main': x.cc:(.text+0x12): undefined reference to `Function()' collect2: ld returned 1 exit status This already fails with

[Bug c++/38392] Template friend function injection

2008-12-15 Thread H9XLrv5oXVNvHiUI at spambox dot us
--- Comment #1 from H9XLrv5oXVNvHiUI at spambox dot us 2008-12-16 01:03 --- Any news? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38392

[Bug c++/38392] Template friend function injection

2008-12-15 Thread pinskia at gcc dot gnu dot org
-- pinskia at gcc dot gnu dot org changed: What|Removed |Added Severity|major |normal http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38392

[Bug c++/38392] Template friend function injection

2008-12-15 Thread pinskia at gcc dot gnu dot org
--- Comment #2 from pinskia at gcc dot gnu dot org 2008-12-16 01:08 --- Confirmed, not a regression. If you swap around main and the template, the link works correctly. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added

[Bug c++/38392] Template friend function injection

2008-12-04 Thread H9XLrv5oXVNvHiUI at spambox dot us
-- H9XLrv5oXVNvHiUI at spambox dot us changed: What|Removed |Added Severity|normal |major http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38392