This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Segmentation fault (core dumped) in little program
- To: egcs-bugs at egcs dot cygnus dot com, gustavo at geneura dot ugr dot es
- Subject: Re: Segmentation fault (core dumped) in little program
- From: Mike Stump <mrs at windriver dot com>
- Date: Mon, 10 Jan 2000 17:16:09 -0800 (PST)
> Date: Mon, 10 Jan 2000 18:27:51 +0100
> From: gustavo <gustavo@geneura.ugr.es>
> This little program compiled with gcc version egcs-2.91.66
> 19990314/Linux (egcs-1.1.2 release), crashes when executed.
> #include <string>
> main()
> {
> string s(0);
> }
> Any idea?
Sure. It's not a bug. This program is supposed to crash when run.
Maybe you want to ask in comp.lang.c++ what the program is supposed to
do or pointers on how to fix it ("0" != 0).
It is similar to the program int main() { abort(); }.