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: [C PATCH] Don't output warning twice (PR c/63626)


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  <polacek@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
joseph@codesourcery.com


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