This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/69020] wrong ADL for attribute cleanup functions
- From: "egallager at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 25 Aug 2017 23:31:17 +0000
- Subject: [Bug c++/69020] wrong ADL for attribute cleanup functions
- Auto-submitted: auto-generated
- References: <bug-69020-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69020
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-08-25
CC| |egallager at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #3 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Martin Sebor from comment #2)
> I agree, but as long as the feature is exposed to users it seems that it
> should work in unsurprising ways (i.e., follow the C++ lookup rules).
> Otherwise, if we don't want C++ programmers to use it, a possible simple fix
> is to reject the attribute in C++. Alternatively, we could reject it when
> the referenced function is dependent to keep it working in the cases we know
> work correctly and prevent unexpected results in the others. Or we can fix
> it and issue a warning suggesting to use a destructor. I'm fine with any of
> these solutions and I'm happy to work up a patch (in fact, I already started
> working on it hoping for a simple fix).
Confirmed, I'd prefer the solution of issuing a warning