Ignore:
Timestamp:
Oct 2, 2022, 10:00:43 PM (6 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
815943f
Parents:
f704974 (diff), f92e7b9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/assert.cfa

    rf704974 rae151cf  
    2525
    2626        #define CFA_ASSERT_FMT "Cforall Assertion error \"%s\" from program \"%s\" in \"%s\" at line %d in file \"%s\""
     27        #define CFA_WARNING_FMT "Cforall Assertion warning \"%s\" from program \"%s\" in \"%s\" at line %d in file \"%s\""
    2728
    2829        // called by macro assert in assert.h
     
    4849                abort();
    4950        }
     51
     52        // called by macro warnf
     53        // would be cool to remove libcfa_public but it's needed for libcfathread
     54        void __assert_warn_f( const char assertion[], const char file[], unsigned int line, const char function[], const char fmt[], ... ) libcfa_public {
     55                __cfaabi_bits_acquire();
     56                __cfaabi_bits_print_nolock( STDERR_FILENO, CFA_WARNING_FMT ": ", assertion, __progname, function, line, file );
     57
     58                va_list args;
     59                va_start( args, fmt );
     60                __cfaabi_bits_print_vararg( STDERR_FILENO, fmt, args );
     61                va_end( args );
     62
     63                __cfaabi_bits_print_nolock( STDERR_FILENO, "\n" );
     64                __cfaabi_bits_release();
     65        }
    5066}
    5167
Note: See TracChangeset for help on using the changeset viewer.