This is the mail archive of the gcc-patches@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]

[C++ Patch] PR 48630 (PR 31423)


Hi,

in these two twin PRs filed by Ian and Gerald, it is pointed out that cases like:

   struct C {
     int f() { return 1; }
   };

   int f(C&c) {
     return ( 1 == c.f );
   }

where the user actually forgot the open-closed round braces are much more likely than cases where an ampersand is missing, still we output

invalid use of member (did you forget the ‘&’ ?)

Thus, the idea of saying instead

invalid use of member (did you forget the ‘()’ ?)

which I implemented in the patchlet below. Alternately we could give both hints, or refer to the argument list.

Tested x86_64-linux.

Thanks,
Paolo.

///////////////////

Attachment: CL_48630
Description: Text document

Attachment: patch_48630
Description: Text document


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