Strange compilation errors.

Alexandre Oliva oliva@dcc.unicamp.br
Sun Oct 11 19:55:00 GMT 1998


Erez Louidor Lior <s3824888@techst02.technion.ac.il> writes:

> When I compiled the following code with STRANGE_ERROR_MESSAGES defined
> I got strange error messages :) :

Thanks, I installed your testcase in the testsuite.  Next time, please
submit a testcase that fails without any defines.

> eg++ -pedantic -c -Wall -DSTRANGE_ERROR_MESSAGES templates4.cc
> templates4.cc: In function `class H<const int> foo(const class H<int>
> &)':
> templates4.cc:16:   instantiated from here
> templates4.cc:26: no matching function for call to `H<int>::cast (const
> H<int> &)'
> templates4.cc:12: candidates are: H<int>::cast<template <class, class>
> caster<{anonymous template type parm},{anonymous template type parm}>,
Source> (const H<Source> &)
> templates4.cc:26: warning: control reaches end of non-void function
> `foo(const H<int> &)'

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:oliva@gnu.org mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil



More information about the Gcc-bugs mailing list