[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROG] Hjælp! Jeg kan ikke crashe mit program!



Carsten Svaneborg wrote:

Jeg har bøvlet meget for at rode med fenv.h og derved
enablede alle FPU signaler, der normalt er disablet, men
har ikke haft noget held til at core dumpe med fx.
nan+1.

Hm, det forstår jeg ikke:


Programmet test1.c:

#include <stdio.h>
#include <fenv.h>

main()
{
  double a,b,c,d;


a=1.0; b=0.0; c=a/b; feenableexcept(FE_ALL_EXCEPT); d=c+a;

  printf("%g %g %g %g\n", a, b, c, d);
}

$ gcc -g -O0 -o test1 test1.c -lm
$ gdb test1
(gdb) run
Starting program: test1

Program received signal SIGFPE, Arithmetic exception.
main () at test1.c:13
13        d=c+a;

Kan det være et optimeringsproblem at du ikke får
exception det rigtige sted?

Mogens


-- Mogens Kjaer, Carlsberg Laboratory, Dept. of Chemistry Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark Phone: +45 33 27 53 25, Fax: +45 33 27 47 08 Email: sslug@sslug Homepage: http://www.crc.dk



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 19:58 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *