[PATCH] Fix unused private field warning in stdexcept after r207695
Dimitry Andric
dimitry at andric.com
Sun Jan 4 08:48:38 PST 2015
On 04 Jan 2015, at 17:42, Joerg Sonnenberger <joerg at britannica.bec.de> wrote:
>
> On Sun, Jan 04, 2015 at 03:24:35PM +0000, Dimitry Andric wrote:
>> However, there isn't any _LIBCPP_UNUSED define in __config yet, so that would have to be added, like in this proposed change.
>
> Shouldn't it actually be attribute *used*?
Yes, that would seem to be more logical, but clang then warns about __used__ not being applicable to class members:
In file included from test-stdexcept.cpp:1:
In file included from trunk/include/array:109:
trunk/include/stdexcept:56:39: warning: '__used__' attribute only applies to variables and functions [-Wignored-attributes]
const char *__imp_ __attribute__((__used__));
^
trunk/include/stdexcept:56:17: warning: private field '__imp_' is not used [-Wunused-private-field]
const char *__imp_ __attribute__((__used__));
^
2 warnings generated.
And then the -Wunused-private-field warning appears anyway. :-/
-Dimitry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150104/6798eb74/attachment.sig>
More information about the cfe-commits
mailing list