This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [wwwdocs] Document Waddress in GCC 4.2
Gerald Pfeifer <gerald@pfeifer.com> writes:
[...]
| PS: I have one comment, not on the patch but on warnings. For the
| following input
|
| struct C {
| int f() { return 1; }
| };
|
| int f(C &c) {
| return ( 1 == c.f );
| }
|
| we currently issue
|
| In function 'int f(C&)':
| 6: error: invalid use of member (did you forget the '&' ?)
|
| In such a case, that is, for member functions, isn't adding the missing
| () more likely than adding &? Would you like me to create a Bugzilla for
| this?
I'm not clear what you mean here; please could you elaborate?
MS compiler used to have a extension called "bounded member" which has
exactly the syntax c.f; I did remember that when I worked on that
specific diagonstic we did have an extended discussion about what to
say -- GNU C++ used tp have that.
-- Gaby