[DynInst_API:] [dyninst/dyninst] c139dd: fix deprecated annotation warning using clang


Date: Mon, 02 Oct 2023 08:45:57 -0700
From: kupsch <noreply@xxxxxxxxxx>
Subject: [DynInst_API:] [dyninst/dyninst] c139dd: fix deprecated annotation warning using clang
  Branch: refs/heads/kupsch/fix_deprecated_annotation
  Home:   https://github.com/dyninst/dyninst
  Commit: c139dd1e2c4de9fc6d182606b67e26b032c71462
      https://github.com/dyninst/dyninst/commit/c139dd1e2c4de9fc6d182606b67e26b032c71462
  Author: James A. Kupsch <kupsch@xxxxxxxxxxx>
  Date:   2023-10-02 (Mon, 02 Oct 2023)

  Changed paths:
    M common/h/compiler_annotations.h

  Log Message:
  -----------
  fix deprecated annotation warning using clang

The clang compiler allows the use of some attributes introduced in a
later language standard than use to compile the source as a
non-standard extension.  Clang's __has_cpp_attribute and
__has_c_attribute returns true for these attributes.  If one of
these attributes is used, clang warns of a non-standard language
feature usage.  So for clang, only use a standard attribute if the
feature test returns true and the language standard version is
valid.

- fix clang's [[deprecated]] (only if C++ >= 14 and C >= 23)

- use now known C-23 __STDC_VERSION__ value 202311L


[← Prev in Thread] Current Thread [Next in Thread→]
  • [DynInst_API:] [dyninst/dyninst] c139dd: fix deprecated annotation warning using clang, kupsch <=