This is the mail archive of the
mailing list for the GCC project.
Re: GCC 6 symbol poisoning and c++ header usage is fragile
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: Joel Sherrill <joel dot sherrill at oarcorp dot com>, Szabolcs Nagy <szabolcs dot nagy at arm dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, nd <nd at arm dot com>, Rich Felker <dalias at libc dot org>, Michael Matz <matz at suse dot de>
- Date: Thu, 21 Apr 2016 18:04:03 +0100
- Subject: Re: GCC 6 symbol poisoning and c++ header usage is fragile
- Authentication-results: sourceware.org; auth=none
- References: <5718B57D dot 1000501 at arm dot com> <CAH6eHdRG-vRp-fEZb8=KbzMUhsok6AR7VekNa=1CQyBvMjc4kQ at mail dot gmail dot com> <5718C8AA dot 7020703 at arm dot com> <CAH6eHdR7+LsXCMHkM_5M2spGQpOV=yS-LSYKamFDnY0XCXsBww at mail dot gmail dot com> <5718E464 dot 6000505 at oarcorp dot com> <CAH6eHdQM3ixB6YL+V01eHRsLaJ3hOL1sg7q7yOL9SC1At4=1vw at mail dot gmail dot com> <CADzB+2nqs-Vs1eQpnXdoecrH0D6pLOSQFZTwL-qUgMGMCEstXw at mail dot gmail dot com>
On 21 April 2016 at 17:47, Jason Merrill wrote:
> On Thu, Apr 21, 2016 at 11:57 AM, Jonathan Wakely <email@example.com>
>> I once tried to write a gcc plugin that would check all names defined
>> by libstdc++ and ensure they were either in the reserved namespace, or
>> were in a whitelist of allowed names defined by the standard (such as
>> "istream" and "read"). It didn't work because gcc plugins don't run
>> early enough, so macros and uninstantiated templates are never seen by
>> the plugin.
> Then let's add plugin callbacks to make that possible.
I've created https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70757