This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/46589] struct member function not declared global


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46589

--- Comment #4 from TonyK <temptony at freemail dot hu> 2010-11-22 00:19:18 UTC ---
(In reply to comment #3)
> There might still be a bug here, just not demonstrated very well by the
> original testcase.  Here's a version where the definitions of S agree, but gcc
> still defines S::f as local and so the program fails to link:
> 
> // file1.cc
> typedef struct { int f(); } S;
> 
> int main()
> {
>   S s;
>   return s.f();
> }
> 
> // file2.cc
> typedef struct { int f(); } S;
> 
> int S::f() { return 0; }

This is exactly the same as my original submission, isn't it?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]