[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: attribute warn_unused_result
From: |
Eli Zaretskii |
Subject: |
Re: attribute warn_unused_result |
Date: |
Fri, 04 Feb 2011 10:29:07 +0200 |
> Date: Thu, 03 Feb 2011 16:57:14 -0800
> From: Paul Eggert <address@hidden>
> CC: Stefan Monnier <address@hidden>, address@hidden
>
> On 02/03/11 13:14, Eli Zaretskii wrote:
> >> From: Stefan Monnier <address@hidden>
>
> >> I think the right thing to do is to adjust the code so as to make it
> >> clear to the compiler that we thought about the issue and decided that
> >> we really do want to ignore the return value.
> >
> > You can't do that, not with this warning.
>
> Actually, you can do it. In the current trunk, the warning is
> ignored for one particular case, documented by wrapping the
> call in question by ignore_value (CALL). This is in
> src/sysdep.c, line 583.
I know, but that's not what I meant, and I imagine that's not what
Stefan meant, either. It is a truism that you can avoid the warning
by adding a call to another function that is not declared with the
warn_unused_result attribute. What I meant was that it seems to be
impossible to tell the compiler not to emit this warning by the
"usual" C technique of using a cast.
Btw, isn't it ironic that gnulib, a GNU project, and all other GNU
projects that use gnulib, need to jump through the hoops to work
around misfeatures in glibc, one of the most important and core GNU
projects?
- Re: attribute warn_unused_result, (continued)
- Re: attribute warn_unused_result, Lennart Borgman, 2011/02/03
- Re: attribute warn_unused_result, Stefan Monnier, 2011/02/04
- Re: attribute warn_unused_result, Lennart Borgman, 2011/02/04
- Re: attribute warn_unused_result, Eli Zaretskii, 2011/02/05
- Re: attribute warn_unused_result, Eli Zaretskii, 2011/02/05
- Re: attribute warn_unused_result, Andy Moreton, 2011/02/03
- Re: attribute warn_unused_result, Paul Eggert, 2011/02/03
- Re: attribute warn_unused_result, Eli Zaretskii, 2011/02/03
- Re: attribute warn_unused_result, Eli Zaretskii, 2011/02/03
- Re: attribute warn_unused_result, Paul Eggert, 2011/02/03
- Re: attribute warn_unused_result,
Eli Zaretskii <=
- Re: attribute warn_unused_result, Tom Tromey, 2011/02/04
- Re: attribute warn_unused_result, Eli Zaretskii, 2011/02/04
- Re: attribute warn_unused_result, Tom Tromey, 2011/02/04
- Re: attribute warn_unused_result, Paul Eggert, 2011/02/04
- Re: attribute warn_unused_result, Eli Zaretskii, 2011/02/05
- Message not available
- Re: attribute warn_unused_result, Paul Eggert, 2011/02/05
- Re: attribute warn_unused_result, Eli Zaretskii, 2011/02/05
- Re: attribute warn_unused_result, Paul Eggert, 2011/02/06
- Re: attribute warn_unused_result, Eli Zaretskii, 2011/02/06
- Re: attribute warn_unused_result, Paul Eggert, 2011/02/06