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] Don't warn for missing prototypes on inline fns (PR c/54113)


On Wed, 4 Dec 2013, Marek Polacek wrote:

> In C99, one way how to deal with inline functions is to put definition
> of the function into header:
> inline void foo (void) { /* ... */ }
> and put the declaration into exactly one .c file, with extern keyword
> (it can also have inline keyword):
> extern void foo (void);
> But in this case, we shouldn't issue the "missing prototype" warning.
> So the following should suppress that warning in C99 mode, when
> -fgnu89-inline is not in effect.  (But the function could still have
> the gnu_inline attribute, so it might be better to disable that
> warning for all inline functions?)
> 
> Regtested/bootstrapped on x86_64-unknown-linux-gnu.  Ok for trunk?

OK.

-- 
Joseph S. Myers
joseph@codesourcery.com


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