On Thu, 23 Oct 2014, Marek Polacek wrote:

> At present, we print the "inline function ... declared but never
> defined" warning twice.  The reason for that is that this warning
> is being printed in pop_scope, which is called when popping file
> scope (c_common_parse_file->pop_file_scope), and when popping
> external scope (c_write_global_declarations).  I think we should
> not print this warning when popping the external scope.
> We don't have to worry about nested functions here.
> 
> Writing a proper testcase is a little bit tricky, but I hope what
> I did would work fine.
> 
> Bootstrapped/regtested on x86_64-linux, ok for trunk?
> 
> 2014-10-23  Marek Polacek  <pola...@redhat.com>
> 
>       PR c/63626
>       * c-decl.c (pop_scope): Don't print warning in external_scope.
> 
>       * gcc.dg/pr63626.c: New test.

OK.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to