Doc on error messages --More questions on error messages

Alexandre Oliva
Mon Feb 26 13:33:00 GMT 2001

On Feb 26, 2001, sherry <> wrote:

> So, there is no doc/page/info on error messages ?


> 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;

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
Red Hat GCC Developer                  aoliva@{,}
CS PhD student at IC-Unicamp        oliva@{,}
Free Software Evangelist    *Please* write to mailing lists, not to me

More information about the Gcc-help mailing list