This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/16897] a rethrow outside of a catch isn't flagged


------- Additional Comments From joerg dot richter at pdv-fs dot de  2004-08-06 13:35 -------
I think in the general case GCC can't know if the throw is inside a catch or 
not.

void func_a()
{
  throw;
}

void func_b()
{
  try
  {
    throw 5;
  }
  catch( ... )
  {
    func_a();
  }
}

Both functions can be in different translation units.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16897


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]