File: abort-1.c

package info (click to toggle)
avr-libc 1%3A1.6.2.cvs20080610-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 14,848 kB
  • ctags: 55,619
  • sloc: ansic: 92,267; asm: 6,692; sh: 4,131; makefile: 2,481; python: 976; pascal: 426; perl: 116
file content (19 lines) | stat: -rw-r--r-- 350 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* Test of abort() function. Now it is a normal function and
   the user can to replace it.
   $Id: abort-1.c,v 1.1 2007/12/17 12:17:55 dmix Exp $	*/

#include <stdlib.h>

volatile int v;		/* to suppress any optimization	*/

__attribute__((noreturn)) void abort (void)
{
    exit (v);
}

int main ()
{
    v = 0;
    abort ();
    return __LINE__;
}