On Wed, Apr 09, 2008 at 09:39:09AM -0700, Yuri wrote:
> I am unable to make a C++ program to catch an exception using the the
> system g++ compiler.
>
> > cat exc.C
> #include
> #include
> using namespace std;
>
> int main() {
> try {
>throw string("String");
> } catch (string s) {
>
On Wed, Apr 09, 2008 at 10:29:05AM -0700, Ted Faber wrote:
> On Wed, Apr 09, 2008 at 09:39:09AM -0700, Yuri wrote:
> > I am unable to make a C++ program to catch an exception using the the
> > system g++ compiler.
> >
> > > cat exc.C
> > #include
> > #include
> > using namespace std;
> >
> > i
Erik Trulsson wrote:
It works fine for me too, using FreeBSD 6-stable and the built-in gcc
3.4.6
as well as with gcc 4.2.4 20080305 installed from ports.
No need to use -pthreads in either case
This means that this issue is STABLE-7.0 specific.
Yuri
__
On Wed, 09 Apr 2008 09:39:09 -0700
Yuri <[EMAIL PROTECTED]> wrote:
> I am unable to make a C++ program to catch an exception using the the
> system g++ compiler.
% c++ -o exc exc.c
% ./exc
Caught an exception "String"
% c++ -O2 -pthread -o exc exc.c
% ./exc
Caught an exc
> > It works fine for me too, using FreeBSD 6-stable and the built-in gcc
> > 3.4.6
> > as well as with gcc 4.2.4 20080305 installed from ports.
> > No need to use -pthreads in either case
>
> This means that this issue is STABLE-7.0 specific.
I am not able to reproduce the problem here; I will
Oh, this mail reminds me...
> >I am not able to reproduce the problem here; I will compile the
> >updated sources tonight to check if that changes anything:
...that I forgot to report that I did a cvsup and rebuild the system
(7.0-STABLE), tonight. That did not change anything: I am not able
to
I had some mixup of gcc versions so I got some false errors with system
compiler.
System gcc-4.2.1 works ok, as well as all gcc-4.2.X
But the newest gcc-4.3.0 breaks.
Executable aborts:
Abort trap: 6
Stack trace in debugger is:
Program received signal SIGABRT, Aborted.
0x28250a67 in kill () f
Oh, this reminded me of something I've seen before. In some version of GCC
(3.96? 4.something?) if you declare a function with an explicit throw()
declaration and then throw from it an exception that is not in the declaration,
the exception never gets caught. It just goes all the way out.
Any cha
8 matches
Mail list logo