This is the mail archive of the gcc-bugs@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]

[Bug c/35017] [4.3 Regression] PR11377 pedwarns even about valid code



------- Comment #5 from joseph at codesourcery dot com  2008-01-29 18:24 -------
Subject: Re:  [4.3 Regression] PR11377 pedwarns even about valid
 code

On Tue, 29 Jan 2008, jakub at gcc dot gnu dot org wrote:

> TREE_READONLY isn't modifiable, so I guess that part is quite clear and I'm
> also
> pretty sure about the possibility to reference static const vars declared in
> the function.
> What is more unclear is in what kind of inline functions this should be warned
> about.  6.7.4p3 talks about inline definition of a function, is that function
> definition with inline keyword in this context (i.e. any non-static inline
> function) or is that inline definition in the 6.7.4p6 sense (one where there is
> no external definition)?
> The attached patch implements the first choice, leaving the original conditions
> for current_function_decl in both places would keep the second choice.
> Joseph?

I think it means inline definition as in 6.7.4p6 (where whether it's an 
inline definition depends on whether there are subsequent declarations 
after the definition with extern or without inline, but getting the 
diagnostics right for such cases is a separate bug).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35017


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