Mail Archives: djgpp/1994/04/26/13:17:52
Compiling the following code with: gcc -g -c test.cc
template <class T>
class base {
T i;
public:
base(const T value) { i = value; }
};
template <class T>
class derived : public base<T> {
public:
derived(const T value) : base<T>(value) {}
};
int main()
{
base<int> a(1);
derived<int> b(2);
return 0;
}
produces the output:
C:\CPROGS\MATRIX>gcc -g -c test.cc
d:/cca00043:10: Error: Rest of line ignored. First ignored character is `<'.
whereas use of gcc -c test.cc works ok. It appears (using -v) that the
error is caused by the assembler. Is this a bug, or is it my error ?
--
Paul Harness, | Internet: gapa83 AT udcf DOT gla DOT ac DOT uk
Department of Physics and Astronomy, |
University of Glasgow, | Tel +44-41-339-8855 ext 8359
Glasgow, G12 8QQ, SCOTLAND. | Fax +44-41-334-9029
- Raw text -