> Shouldn't there be a warning from newer gcc, i.e. from trunk?

The code in GCC 4.3 reads:

      /* Inline declaration after use or definition.
         ??? Should we still warn about this now we have unit-at-a-time
         mode and can get it right?
         Definitely don't complain if the decls are in different translation
         units.
         C99 permits this, so don't warn in that case.  (The function
         may not be inlined everywhere in function-at-a-time mode, but
         we still shouldn't warn.)  */
     if (DECL_DECLARED_INLINE_P (newdecl) && !DECL_DECLARED_INLINE_P (olddecl)
          && same_translation_unit_p (olddecl, newdecl)
          && flag_gnu89_inline)
        {
          if (TREE_USED (olddecl))
            {
              warning (0, "%q+D declared inline after being called", olddecl);
              warned = true;
            }
          else if (DECL_INITIAL (olddecl))
            {
              warning (0, "%q+D declared inline after its definition", olddecl);
              warned = true;
            }
        }

It was removed by:

2008-07-24  Jan Hubicka  <j...@suse.cz>

        * cgraphbuild.c (record_reference): Drop non-unit-at-a-time code.
        (build_cgraph_edges): Likewise.
[...]
        * c-decl.c (diagnose_mismatched_decls): Do not require inline keyword
        early in GNU dialect.


so I presume that the answer is no.

-- 
Eric Botcazou

Reply via email to