public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "harald at gigawatt dot nl" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/58876] No non-virtual-dtor warning in std::unique_ptr
Date: Tue, 31 Aug 2021 20:09:53 +0000	[thread overview]
Message-ID: <bug-58876-4-ISGqVFWyzw@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-58876-4@http.gcc.gnu.org/bugzilla/>

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

Harald van Dijk <harald at gigawatt dot nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |harald at gigawatt dot nl

--- Comment #12 from Harald van Dijk <harald at gigawatt dot nl> ---
(In reply to Jonathan Wakely from comment #11)
> No, probably not. Comment 2 doesn't work because -Wsystem-headers can't be
> enabled and disabled using pragmas. It doesn't work like other warnings.

However, the internal version of the #line directive, # [line number] [file
name] [flags] could be used to mark a region of a system header as non-system
header, which should achieve the same result, right? It might need a bit of
cleanup to be maintainable, but this seems to work as a proof of concept:

--- bits/unique_ptr.h
+++ bits/unique_ptr.h
@@ -82,7 +82,9 @@
                     "can't delete pointer to incomplete type");
        static_assert(sizeof(_Tp)>0,
                     "can't delete pointer to incomplete type");
+# 86 __FILE__
        delete __ptr;
+# 88 __FILE__ 3
       }
     };

  parent reply	other threads:[~2021-08-31 20:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-58876-4@http.gcc.gnu.org/bugzilla/>
2013-10-30 15:04 ` redi at gcc dot gnu.org
2013-10-30 17:57 ` paolo.carlini at oracle dot com
2013-10-30 18:00 ` redi at gcc dot gnu.org
2013-10-30 18:00 ` redi at gcc dot gnu.org
2014-06-25  9:28 ` redi at gcc dot gnu.org
2014-12-23 23:43 ` mw_triad at users dot sourceforge.net
2014-12-24  9:01 ` redi at gcc dot gnu.org
2014-12-24 16:59 ` mw_triad at users dot sourceforge.net
2014-12-24 20:08 ` redi at gcc dot gnu.org
2014-12-26 16:31 ` mw_triad at users dot sourceforge.net
2021-04-17 10:23 ` db0451 at gmail dot com
2021-04-19 10:40 ` redi at gcc dot gnu.org
2021-08-31 18:20 ` redi at gcc dot gnu.org
2021-08-31 20:09 ` harald at gigawatt dot nl [this message]
2021-09-01  9:57 ` redi at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-58876-4-ISGqVFWyzw@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).