C++ :: Stack array bounds write purify error with exceptions

Raghu Annaluru raghu_annaluru@yahoo.com
Wed Jan 5 05:00:00 GMT 2005


Hi,
We are facing a purify "Stack array bounds write"
error with exceptions. We first tried with gcc 3.2.3
and then with gcc 3.4.3 and in both cases we are
getting the same error.
The code is as under:

#include<iostream>
using namespace std;
void inner() throw(int)
{
 int m=10;
 throw m;
}
void upper() throw(int)
{
try{
 inner();
}
catch(int& n) {
 throw ; // <- problem line
}
}
int main()
{
try
{
 upper();
}
catch (int& o)
{
cout << "in main block \n" << o << "\n";
}
return 0;
}

-------------------------------
if instead of
throw;

we code it as
throw n;
there are no purify errors. what may be the problem?

thanks & regards,
Raghu




		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250



More information about the Gcc mailing list