Re: PR c++/24985 caret diagnostics for macro expansions

2012-05-04 Thread Jason Merrill
On 05/03/2012 08:30 PM, Manuel López-Ibáñez wrote: Do you have an opinion about the macro unwinder? I agree. Jason

Re: PR c++/24985 caret diagnostics for macro expansions

2012-05-04 Thread Dodji Seketeli
Manuel López-Ibáñez writes: > This patch enables caret diagnostics for macro expansions. So now we will get: > > /home/manuel/macro-clang.c:2:91: error: invalid operands to binary < > (have ‘struct mystruct’ and ‘float’) > #define MYMAX(A,B) __extension__ ({ __typeof__(A) __a = (A); > __typeof__

Re: PR c++/24985 caret diagnostics for macro expansions

2012-05-03 Thread Manuel López-Ibáñez
On 4 May 2012 02:08, Gabriel Dos Reis wrote: > On Thu, May 3, 2012 at 6:56 PM, Manuel López-Ibáñez > wrote: >> On 4 May 2012 01:09, Gabriel Dos Reis wrote: >>> >>> The patch changes indentation in several places (violating, I think >>> coding conventions) which are unrelated to the functionality

Re: PR c++/24985 caret diagnostics for macro expansions

2012-05-03 Thread Gabriel Dos Reis
On Thu, May 3, 2012 at 6:56 PM, Manuel López-Ibáñez wrote: > On 4 May 2012 01:09, Gabriel Dos Reis wrote: >> >> The patch changes indentation in several places (violating, I think >> coding conventions) which are unrelated to the functionality >> that the patch is supposed to implement.  Could yo

Re: PR c++/24985 caret diagnostics for macro expansions

2012-05-03 Thread Manuel López-Ibáñez
On 4 May 2012 01:09, Gabriel Dos Reis wrote: > > The patch changes indentation in several places (violating, I think > coding conventions) which are unrelated to the functionality > that the patch is supposed to implement.  Could you resend > a version unencumbered by those changes for review? > T

Re: PR c++/24985 caret diagnostics for macro expansions

2012-05-03 Thread Gabriel Dos Reis
On Thu, May 3, 2012 at 5:58 PM, Manuel López-Ibáñez wrote: > This patch enables caret diagnostics for macro expansions. So now we will get: > > /home/manuel/macro-clang.c:2:91: error: invalid operands to binary < > (have ‘struct mystruct’ and ‘float’) >  #define MYMAX(A,B) __extension__ ({ __typeo

PR c++/24985 caret diagnostics for macro expansions

2012-05-03 Thread Manuel López-Ibáñez
This patch enables caret diagnostics for macro expansions. So now we will get: /home/manuel/macro-clang.c:2:91: error: invalid operands to binary < (have ‘struct mystruct’ and ‘float’) #define MYMAX(A,B) __extension__ ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; })