public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/114777] New: inconsistent warning for pure functions on deconstructors/constructors on arm compared to other targets
@ 2024-04-19  0:22 pinskia at gcc dot gnu.org
  2024-04-19  0:34 ` [Bug c++/114777] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-19  0:22 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114777
           Summary: inconsistent warning for pure functions on
                    deconstructors/constructors on arm compared to other
                    targets
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---
            Target: arm-eabi, arm-linux-gnueabi

Take:
```
struct A {
    A();
    [[gnu::pure]] ~A();
};
```

This warns on all targets except for arm-eabi (and arm-linux-gnueabi) due to
having targetm.cxx.cdtor_returns_this() return true.

I only noticed this while working on PR 19661 .

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

* [Bug c++/114777] inconsistent warning for pure functions on deconstructors/constructors on arm compared to other targets
  2024-04-19  0:22 [Bug c++/114777] New: inconsistent warning for pure functions on deconstructors/constructors on arm compared to other targets pinskia at gcc dot gnu.org
@ 2024-04-19  0:34 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-19  0:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note we only started to warn about pure/const on functions returning void in
GCC 8 .

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

end of thread, other threads:[~2024-04-19  0:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-19  0:22 [Bug c++/114777] New: inconsistent warning for pure functions on deconstructors/constructors on arm compared to other targets pinskia at gcc dot gnu.org
2024-04-19  0:34 ` [Bug c++/114777] " 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).