g++ 3.0.1 does not compile the attached file but 2.96 does
Daqing Hou
daqing@cs.ualberta.ca
Mon Sep 10 16:57:00 GMT 2001
Originator Daqing Hou
Synopsis g++ 3.0.1 does not compile the attached file but 2.96 does
Category c++
Release g++ 3.0.1
Description
[daqing@sunchild Observer]$ ~/cppx/execs/g++ Observer.cc
In file included from Observer.cc:1:
Subject.h:9: syntax error before `;' token
Subject.h:10: syntax error before `::' token
Subject.h:23: `string' was not declared in this scope
Subject.h:23: parse error before `)' token
Subject.h:25: 'string' is used as a type, but is not defined as a type.
Subject.h:28: 'Olist' is used as a type, but is not defined as a type.
Subject.h: In constructor `Subject::Subject()':
Subject.h:15: class `Subject' does not have any field named `name'
In file included from Observer.cc:2:
Observer.h: At global scope:
Observer.h:23: 'string' is used as a type, but is not defined as a type.
Observer.cc: In member function `virtual void
Observer::update(Subject*)':
Observer.cc:9: `name' undeclared (first use this function)
Observer.cc:9: (Each undeclared identifier is reported only once for
each
function it appears in.)
Observer.cc:9: `class Subject' has no member named `name'
Observer.cc:10: `cout' undeclared (first use this function)
Observer.cc:11: `endl' undeclared (first use this function)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: source.tar.gz
Type: application/x-gzip
Size: 87728 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20010910/6b70a9eb/attachment.bin>
More information about the Gcc-bugs
mailing list