Skip to content
  • Alessandro Di Federico's avatar
    15178146
    Make message optional for `revng_` assertions · 15178146
    Alessandro Di Federico authored
    This commit introduces a trick for having optional arguments in
    macros. This enables the `revng_abort` and `revng_unreachable` macros to
    have 0 or 1 argument, and the `revng_assert` and `revng_check` macros to
    have 1 or 2 arguments.
    
    Note that, by employing a macro trick (instead of C++ default
    arguments), we keep the header compatible with C files.
    15178146
    Make message optional for `revng_` assertions
    Alessandro Di Federico authored
    This commit introduces a trick for having optional arguments in
    macros. This enables the `revng_abort` and `revng_unreachable` macros to
    have 0 or 1 argument, and the `revng_assert` and `revng_check` macros to
    have 1 or 2 arguments.
    
    Note that, by employing a macro trick (instead of C++ default
    arguments), we keep the header compatible with C files.
Loading