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
}
};