Re: [PATCH c++/57709] Wshadow is too strict / has false positives

2014-08-22 Thread Jason Merrill
On 08/22/2014 02:24 PM, Manuel López-Ibáñez wrote: + && DECL_P(member)) Missing space before paren. OK with that fixed. Jason

Re: [PATCH c++/57709] Wshadow is too strict / has false positives

2014-08-22 Thread Manuel López-Ibáñez
On 22 August 2014 00:22, Paolo Carlini wrote: > Hi, > > > On 08/22/2014 12:01 AM, Manuel López-Ibáñez wrote: >> >> On 21 August 2014 23:35, Jason Merrill wrote: >>> >>> On 08/21/2014 04:22 PM, Manuel López-Ibáńez wrote: + && TREE_CODE (x) != FUNCTION_DECL +

Re: [PATCH c++/57709] Wshadow is too strict / has false positives

2014-08-21 Thread Paolo Carlini
Hi, On 08/22/2014 12:01 AM, Manuel López-Ibáñez wrote: On 21 August 2014 23:35, Jason Merrill wrote: On 08/21/2014 04:22 PM, Manuel López-Ibáńez wrote: + && TREE_CODE (x) != FUNCTION_DECL + && !FUNCTION_POINTER_TYPE_P (TREE_TYPE (x How about p

Re: [PATCH c++/57709] Wshadow is too strict / has false positives

2014-08-21 Thread Manuel López-Ibáñez
On 21 August 2014 23:35, Jason Merrill wrote: > On 08/21/2014 04:22 PM, Manuel López-Ibáńez wrote: >> >> + && TREE_CODE (x) != FUNCTION_DECL >> + && !FUNCTION_POINTER_TYPE_P (TREE_TYPE (x > > > How about pointer to member function? Maybe like this?

Re: [PATCH c++/57709] Wshadow is too strict / has false positives

2014-08-21 Thread Jason Merrill
On 08/21/2014 04:22 PM, Manuel López-Ibáñez wrote: + && TREE_CODE (x) != FUNCTION_DECL + && !FUNCTION_POINTER_TYPE_P (TREE_TYPE (x How about pointer to member function? Jason

[PATCH c++/57709] Wshadow is too strict / has false positives

2014-08-21 Thread Manuel López-Ibáñez
In GCC 4.8 I implemented: "The option -Wshadow no longer warns if a declaration shadows a function declaration, unless the former declares a function or pointer to function, because this is a common and valid case in real-world code." This patch applies the same heuristic to member functions. Bo