https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102647

            Bug ID: 102647
           Summary: Wrong caret location for 'attribute directive ignored'
                    warning
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

[[always_inline]] inline void bar() noexcept { __builtin_abort(); }


This warns because it should be [[gnu::always_inline]] but the location is
wrong:

attr.C:1:37: warning: ‘always_inline’ attribute directive ignored
[-Wattributes]
    1 | [[always_inline]] inline void bar() noexcept { __builtin_abort(); }
      |                                     ^~~~~~~~

It would also be nice if we suggested using the gnu:: namespace when we ignore
an attribute that *is* known, but isn't being used correctly.

Reply via email to