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]

Re: [C++ PATCH] PR c++/79133


Hi,

On 07/07/2018 23:20, Ville Voutilainen wrote:
+	    error_at (DECL_SOURCE_LOCATION (old),
+		      "capture %qD and lambda parameter %qD "
+		      "have the same name",
+		      decl, old);
Let's consider, say (with -Wshadow):

int main() {
  int x = 42;
  auto lambda0 = [x]() { int x; };
}

I'm thinking that the new diagnostic should be more consistent with it.

Paolo.


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