public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/102647] New: Wrong caret location for 'attribute directive ignored' warning
@ 2021-10-08 11:02 redi at gcc dot gnu.org
  2021-10-08 20:39 ` [Bug c++/102647] " pinskia at gcc dot gnu.org
  2021-12-03  2:02 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2021-10-08 11:02 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/102647] Wrong caret location for 'attribute directive ignored' warning
  2021-10-08 11:02 [Bug c++/102647] New: Wrong caret location for 'attribute directive ignored' warning redi at gcc dot gnu.org
@ 2021-10-08 20:39 ` pinskia at gcc dot gnu.org
  2021-12-03  2:02 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-08 20:39 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=64332
         Depends on|64332                       |

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Attributes in general have a location issue.  There a few others than the ones
I listed so far


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64332
[Bug 64332] wrong location for Wattributes warning

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/102647] Wrong caret location for 'attribute directive ignored' warning
  2021-10-08 11:02 [Bug c++/102647] New: Wrong caret location for 'attribute directive ignored' warning redi at gcc dot gnu.org
  2021-10-08 20:39 ` [Bug c++/102647] " pinskia at gcc dot gnu.org
@ 2021-12-03  2:02 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-03  2:02 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=78425
   Last reconfirmed|                            |2021-12-03
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed. Though I think this is almost exact dup of bug 78425.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-12-03  2:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-08 11:02 [Bug c++/102647] New: Wrong caret location for 'attribute directive ignored' warning redi at gcc dot gnu.org
2021-10-08 20:39 ` [Bug c++/102647] " pinskia at gcc dot gnu.org
2021-12-03  2:02 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).