This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, libiberty]: Avoid "enum conversion when passing argument 1 of âgetrusageâ is invalid in C++" warning


On Wed, Jul 1, 2015 at 3:07 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
>
> This patch avoids "enum conversion when passing argument 1 of
> âgetrusageâ is invalid in C++" warning when compiling getruntime.c.
> The condition is copied from sys/resource.h.

Sorry, I've been on vacation.

I think it would be a lot nicer to always use RUSAGE_SELF in the
function, and earlier in the file write

#ifndef RUSAGE_SELF
#define RUSAGE_SELF 0
#endif

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]