------- Comment #35 from manu at gcc dot gnu dot org  2008-01-15 16:44 -------
(In reply to comment #33)
> Yes, this is what I understand.  I think we need a new flag specifying
> if in the source the 'inline' keyword was used and solely use that for
> inline warning purposes.  (That is, I would not expect to get a warning
> for non-'inline' class methods either, regardless of -fdefault-inline
> setting).
> 

Then, you would need more than a new flag. Currently the problem is to
distinguish
1) the explicit 'inline' keyword and the implicit inline keyword of
-fdefault-inline from 2) no inline whatsoever and no inline because of
-fno-default-inline

Currently:

explicit inline: DECL_DECLARED_INLINE 
fdefault-inline : DECL_DECLARED_INLINE
fno-default-inline: DECL_DECLARED_INLINE
no inline:

(DECL_INLINE is an internal note that the function may be inlinable. Neither
explicit inline nor -fdefault-inline actually ensure that DECL_INLINE will be
always true).

Ideally:

explicit inline: DECL_DECLARED_INLINE && DECL_INLINE_LINKAGE
fdefault-inline : DECL_DECLARED_INLINE && DECL_INLINE_LINKAGE
fno-default-inline: DECL_INLINE_LINKAGE
no inline:

In your proposal we will need:

explicit inline: DECL_EXPLICITLY_DECLARED_INLINE && DECL_DECLARED_INLINE &&
DECL_INLINE_LINKAGE
fdefault-inline : DECL_DECLARED_INLINE && DECL_INLINE_LINKAGE
fno-default-inline: DECL_INLINE_LINKAGE
no inline:


-- 


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

Reply via email to