http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52964

--- Comment #3 from davidxl <xinliangli at gmail dot com> 2012-04-12 23:19:33 
UTC ---
(In reply to comment #2)
> And with trunk we print:
> 
> pr52964.cc: In instantiation of ‘struct S1<4>’:
> pr52964.cc:2:49:   required from ‘struct S2<int>’
> pr52964.cc:3:45:   required from ‘void foo(T) [with T = int]’
> pr52964.cc:4:21:   required from here
> pr52964.cc:1:43: error: size of array is negative
>  template <int N> struct S1 { int arr[N - 5]; };
>                                            ^
> 
> We could easily print the caret for each line. And the locations could be much
> better.
> 
> I also like more the order of Clang and the extra info about what each thing
> is, but we would have to convince Gabriel and/or Jason.
> 
> David, what else do you see that could be improved?

With -fsyntax-only, the warning is not emitted -- any reason for that?

David

Reply via email to