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]

Re: Segmentation fault (core dumped) in little program


> 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(); }.

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