Changeset dfa66dc


Ignore:
Timestamp:
Jul 20, 2017, 5:58:10 PM (7 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
91c389a
Parents:
3354e6d
Message:

merge assert into assert.h, and remove assert

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/stdhdr/assert.h

    r3354e6d rdfa66dc  
    1010// Created On       : Mon Jul  4 23:25:26 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Jul  5 20:34:23 2016
    13 // Update Count     : 8
     12// Last Modified On : Thu Jul 20 16:00:53 2017
     13// Update Count     : 10
    1414//
    1515
     
    1818#endif //__CFORALL__
    1919
    20 // has internal check for multiple expansion
    2120#include_next <assert.h>
     21
     22#ifdef NDEBUG
     23        #define assertf(expr, fmt, ...) ((void)0)
     24#else
     25        #define __STRINGIFY__(str) #str
     26        #define __VSTRINGIFY__(str) __STRINGIFY__(str)
     27        #define assertf(expr, fmt, ...) ((expr) ? ((void)0) : __assert_fail_f(__VSTRINGIFY__(expr), __FILE__, __LINE__, __PRETTY_FUNCTION__, fmt, ## __VA_ARGS__ ))
     28        void __assert_fail_f( const char *assertion, const char *file, unsigned int line, const char *function, const char *fmt, ... ) __attribute__((noreturn));
     29#endif
    2230
    2331#ifdef __CFORALL__
Note: See TracChangeset for help on using the changeset viewer.