This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Doc on error messages --More questions on error messages
On Feb 26, 2001, sherry <sherry@zeroknowledge.com> wrote:
> So, there is no doc/page/info on error messages ?
Yep.
> I have seen an error that says:
> looser throw specifier for virtual `foo`
> And that happens when the base class has a throw() spec while the derived
> class does not.
> But why is this an error?
Because the C++ Standard says so.
Just think of it. Given:
base *x;
x->foo();
if you were allowed to throw exceptions not defined in the base class
interface, how would one be able to trust exception specifications?
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me