------- Comment #26 from manu at gcc dot gnu dot org  2010-06-04 20:22 -------
(In reply to comment #25)
> 
> $ ./cc1 -quiet test.c
> While expanding macro OPERATE at test.c:2:8
> While expanding macro SHIFTL at test.c:5:14
> While expanding macro MULT2 at test.c:8:3
> test.c: In function 'g':
> test.c:13:3: error: invalid operands to binary << (have 'double' and 'int')

I find this output a bit confusing. I find clang's output clearer
http://clang.llvm.org/diagnostics.html.

In fact, clang's output actually follows more closely what GCC already does
with templates/inline functions. This is from GCC:

test.C:7:3:   instantiated from ‘void SHIFTL(T1, T2) [with T1 = double, T2 =
int]’
test.C:10:3:   instantiated from ‘void MULT2(T) [with T = double]’
test.C:15:20:   instantiated from here
test.C:3:3: error: invalid operands of types ‘double’ and ‘int’ to
binary ‘operator<<

Also, what are the column numbers pointing to? They don't make sense to me.

In any case, this is a huge step forward! Thanks for working on this. It would
be an important marketing point if you manage to complete it for GCC 4.6.


-- 


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

Reply via email to