This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: -Winline option


From: Roland McGrath <roland@hack.frob.com>
Date: Thu,  9 Apr 2015 12:24:08 -0700 (PDT)

> Heretofore we have said that the inline keyword should be dropped if it's
> not essential that something be inlined.  Then the compiler will still
> inline it if it thinks that's optimal, but won't warn.

In this particular case the inline is in a header file to provide a
function used by applications.

If you remove the inline keyword, then every include of scratch_buffer.h
gets a static copy in it's object file, moreso the compiler is going to
warn if the function is unused by that foo.c file.

I still stand by my position that -Winline is foolhardy and thus should
be removed.


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