[DynInst_API:] [dyninst/dyninst] dd5dc0: fix deprecated annotation warning using clang (#1554)


Date: Mon, 02 Oct 2023 11:36:48 -0700
From: kupsch <noreply@xxxxxxxxxx>
Subject: [DynInst_API:] [dyninst/dyninst] dd5dc0: fix deprecated annotation warning using clang (#1554)
  Branch: refs/heads/master
  Home:   https://github.com/dyninst/dyninst
  Commit: dd5dc02a68270d2eec18a6cb6978ba0d16426685
      https://github.com/dyninst/dyninst/commit/dd5dc02a68270d2eec18a6cb6978ba0d16426685
  Author: 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 (#1554)

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] dd5dc0: fix deprecated annotation warning using clang (#1554), kupsch <=