This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [testcase] Simplified testcases why current gcc trunk cannot compile glibc
On Oct 17, 2001, Richard Henderson <rth@redhat.com> wrote:
>> +extern inline void function_declaration_before(void) __attribute__((__noinline__));
> inline and noinline on the same declaration? That would seem to
> want to elicit at least warning, possibly an error. Particularly
> "extern inline" which means that the definition exists elsewhere
> and we don't have to emit code for it here at all.
Damn, you noticed it! :-D
This is a bit tricky to implement, because DECL_INLINE doesn't imply
the function was *declared* as inline, and DECL_DECLARED_INLINE_P is
only available in c-tree.h, so we shouldn't use it in attribs.c, that
is front end-neutral.
Should I add a new hook that defaults to a function that returns
DECL_INLINE but is overridden in C and C++ to return
DECL_DECLARED_INLINE_P, or perform the test in duplicate_decls() of
each front-end? The latter may give false positives in case we set
DECL_UNINLINABLE for other reasons, so I'm leaning towards the
former. Comments?
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me