[all-commits] [llvm/llvm-project] adba14: Stop using __attribute__((retain)) in GCC builds (...

Matthias Braun via All-commits all-commits at lists.llvm.org
Tue Apr 1 13:21:05 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: adba14acea99cc6a17d837763a3248c9d4a2fadf
      https://github.com/llvm/llvm-project/commit/adba14acea99cc6a17d837763a3248c9d4a2fadf
  Author: Matthias Braun <matze at braunis.de>
  Date:   2025-04-01 (Tue, 01 Apr 2025)

  Changed paths:
    M llvm/include/llvm/Support/Compiler.h

  Log Message:
  -----------
  Stop using __attribute__((retain)) in GCC builds (#133793)

GCC sometimes produces warnings about `__attribute__((retain))` despite
`__has_attribute(retain)` being 1. See:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99587

The amount of users who benefit from the attribute is probably very
small compared to the amount of `-Werror` enabled builds or the desire
to keep `-Wattributes` enabled in the LLVM build. So for now drop usage
of the `retain` attribute in GCC builds.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list