OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [include/] [java-assert.h] - Blame information for rev 757

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 757 jeremybenn
// java-assert.h - Header file holding assertion definitions.  -*- c++ -*-
2
 
3
/* Copyright (C) 1998, 1999, 2010  Free Software Foundation
4
 
5
   This file is part of libgcj.
6
 
7
This software is copyrighted work licensed under the terms of the
8
Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
9
details.  */
10
 
11
#ifndef __JAVA_ASSERT_H__
12
#define __JAVA_ASSERT_H__
13
 
14
// This is a libgcj implementation header.
15
 
16
void _Jv_Abort (const char *, const char *, int, const char *)
17
  __attribute__ ((__noreturn__));
18
 
19
#ifdef __GCJ_DEBUG
20
#define _Jv_AssertDoCall(Message) _Jv_Abort (__FUNCTION__, __FILE__, __LINE__, Message)
21
 
22
#define JvAssertMessage(Expr, Message) \
23
   do { if (! (Expr)) _Jv_AssertDoCall (Message); } while (0)
24
#define JvAssert(Expr) \
25
   do { if (! (Expr)) _Jv_AssertDoCall (# Expr); } while (0)
26
 
27
#define JvFail(Message) _Jv_AssertDoCall (Message)
28
 
29
#else /* __GCJ_DEBUG */
30
 
31
#define _Jv_AssertDoCall(Message)
32
#define JvAssertMessage(Expr, Message) (void) sizeof (Expr)
33
#define JvAssert(Expr) (void) sizeof (Expr)
34
#define JvFail(Message) _Jv_Abort (0, 0, 0, Message)
35
 
36
#endif /* not __GCJ_DEBUG */
37
 
38
#endif /* __JAVA_ASSERT_H__ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.