[PING^3] PR middle-end/18071 -Winline does not respect -fno-default-inline

Mark Mitchell mark@codesourcery.com
Sun Mar 4 20:32:00 GMT 2007


Manuel López-Ibáñez wrote:

> cp/
> * decl.c (start_method): Don't set DECL_DECLARED_INLINE_P if
> -fno-default-inline.

I don't think this change is correct.  DECL_DECLARED_INLINE_P controls
linkage, and -fno-default-inline is documented as not changing linkage.
 Thus, the change that you're making might affect the linkage of inline
functions in object files, which would be bad.  The C++ front end sets
DECL_DECLARED_INLINE_P, but no DECL_INLINE, which seems exactly
consistent with the documentation: this function should be treated as
inline for linkage purposes, but the middle end should not try to inline it.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713



More information about the Gcc-patches mailing list