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


Date: Mon, 02 Oct 2023 07:41:28 -0700
From: kupsch <noreply@xxxxxxxxxx>
Subject: [DynInst_API:] [dyninst/dyninst] 33fa0c: fix deprecated annotation warning using clang
  Branch: refs/heads/kupsch/fix_deprecated_annotation
  Home:   https://github.com/dyninst/dyninst
  Commit: 33fa0cd0a50dc96adba51a9ee493375f1d0d389e
      https://github.com/dyninst/dyninst/commit/33fa0cd0a50dc96adba51a9ee493375f1d0d389e
  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 use of [[deprecated]] (added in in C++ 14 and C 23) with clang

- use now known C-23 __STDC_VERSION__ value 202311L


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