Re: Class hierarchy of exceptions (Ada, C++)

From: fabio de francesco (fmdf_at_tiscali.it)
Date: 03/30/05


Date: 30 Mar 2005 05:24:47 -0800


Ioannis Vranos wrote:
> fabio de francesco wrote:
>
> > Is the following permitted in C++?
> >
> > // file point.cpp

> > [skip code]

> >
> > Shouldn't it have to complain?

> It is permitted. What you are incrementing above is the value stored
in variable a.

Yes, with the only problem that the stack has already released space
reserved for that variable called "a".

> Also check this:
>
>
> #include <iostream>
> #include <cstdlib>
> #include <csignal>
>
>
> inline void SigSegVHandler(int signal)
> {
> using namespace std;
>
> cerr<<"Illegal memory operation!\n"<<"Exiting...\n";
>
> exit(EXIT_FAILURE);
> }
>
> int main()
> {
> using namespace std;
>
> signal(SIGSEGV, SigSegVHandler);
>
> int *p= 0;
>
> ++(*p);
>
> return 0;
> }

Here you catch and handle a system SIGSEGV signal... I am missing the
point.

> Ioannis Vranos
>
> http://www23.brinkster.com/noicys

fabio de francesco



Relevant Pages

  • Re: TCP/IP Sockets with GNAT.Sockets
    ... > fabio de francesco wrote: ... >> Is your code reading character by character? ... I supposed that Ada and C aren't different in that. ...
    (comp.lang.ada)
  • Re: survival of c++
    ... JKop may get to maintain legacy code not written by someone as ... > language, a lot of good professionals are out there, billions of lines ... > Fabio De Francesco ...
    (comp.lang.cpp)
  • Re: errors = templates * friends;
    ... > Fabio De Francesco. ... Templates that will be used in multiple files have to be implemented in the ...
    (comp.lang.cpp)
  • Re: linker errors with templates
    ... > Fabio De Francesco wrote: ... >> is when the author writes the explicit instantiation of a class it ... > maintainer of the FAQ. ...
    (comp.lang.cpp)
  • Re: Tenacity should be rewarded
    ... > I have been reading news from this group since a couple of weeks and ... > from AoA has the same meaning in NASM. ... > Fabio De Francesco. ...
    (alt.lang.asm)