Personal tools
You are here: Home Projects C++ Cfront releases Release 3.0.3 source incl-master proto-headers assert.h
Document Actions

assert.h

by Michael L Powell last modified 2007-01-26 03:21

Click here to get the file

Size 1.4 kB - File type text/plain

File contents

/*ident	"@(#)cls4:incl-master/proto-headers/assert.h	1.1" */
/*******************************************************************************
 
C++ source for the C++ Language System, Release 3.0.  This product
is a new release of the original cfront developed in the computer
science research center of AT&T Bell Laboratories.

Copyright (c) 1991 AT&T and UNIX System Laboratories, Inc.
Copyright (c) 1984, 1989, 1990 AT&T.  All Rights Reserved.

THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE of AT&T and UNIX System
Laboratories, Inc.  The copyright notice above does not evidence
any actual or intended publication of such source code.

*******************************************************************************/
#usedby all
/* This header file intentionally has no wrapper, since the user
*  may want to re-include it to turn off/on assertions for only
*  a portion of the source file.
*/


#ifdef assert
#undef assert
#endif
#ifdef _assert
#undef _assert
#endif

#ifdef NDEBUG

#define assert(e) ((void)0)

#else

#ifndef __STDIO_H
#include <stdio.h>
#endif

#ifndef __STDLIB_H
#include <stdlib.h>
#endif

#if defined(__STDC__)
#define assert(EX) (void)((EX) || (fprintf(stderr,"Assertion failed: " # EX ", file \"%s\", line %d\n", __FILE__, __LINE__), abort(), 0))
#else
#define assert(EX) (void)((EX) || (fprintf(stderr,"Assertion failed: EX file \"%s\", line %d\n", __FILE__, __LINE__), abort(), 0))
#endif
#endif

#define _assert(e) assert(e)

« December 2014 »
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: