Embedded Artistry libc
C Standard Library Support for Bare-metal Systems
assert.c
Go to the documentation of this file.
1
#include <
assert.h
>
2
#include <
stdio.h
>
3
#include <
stdlib.h
>
4
5
__attribute__
((noreturn, weak))
void
__assert_fail(
const
char
* expr,
const
char
*
file
,
6
unsigned
int
line
,
const
char
*
function
)
7
{
8
printf(
"Assertion failed: %s (%s: %s: %u)\n"
, expr,
file
,
function
,
line
);
9
abort
();
10
}
abort
void abort(void) __attribute__((noreturn))
file
const char * file
Definition:
assert.h:18
assert.h
line
const char unsigned int line
Definition:
assert.h:18
stdio.h
__attribute__
__attribute__((noreturn, weak))
Definition:
assert.c:5
stdlib.h
src
assert
assert.c
Generated by
1.8.15