[DynInst_API:] [dyninst/dyninst] 539e0a: fix statement-like macros (#1143)


Date: Sun, 07 Nov 2021 11:41:35 -0800
From: kupsch <noreply@xxxxxxxxxx>
Subject: [DynInst_API:] [dyninst/dyninst] 539e0a: fix statement-like macros (#1143)
  Branch: refs/heads/master
  Home:   https://github.com/dyninst/dyninst
  Commit: 539e0a0934ac6943377d966053bc72d83ac17b0a
      https://github.com/dyninst/dyninst/commit/539e0a0934ac6943377d966053bc72d83ac17b0a
  Author: kupsch <kupsch@xxxxxxxxxxx>
  Date:   2021-11-07 (Sun, 07 Nov 2021)

  Changed paths:
    M dwarf/src/dwarfResult.C
    M dyninstAPI/src/ast.C
    M symtabAPI/src/dwarfWalker.C

  Log Message:
  -----------
  fix statement-like macros (#1143)

wrap macro body in 'do {...} while (0)' so they can be used as if they were a
statement with a terminating semicolon.

changed break to return since it then works in a do/while loop and was
semantically the same in all the expansions

parenthesized the use of parameters as needed


[← Prev in Thread] Current Thread [Next in Thread→]
  • [DynInst_API:] [dyninst/dyninst] 539e0a: fix statement-like macros (#1143), kupsch <=