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

Re: [PATCH] Use DISREGARD_INLINE_LIMITS_P even for C++ gnu_inline functions that were recently added


On 8/29/07, Jakub Jelinek <jakub@redhat.com> wrote:
> On Tue, Aug 28, 2007 at 11:09:14AM +0200, Richard Guenther wrote:
> > 2007-08-27  Richard Guenther  <rguenther@suse.de>
> >
> >       * tree.h (DECL_DISREGARD_INLINE_LIMITS): New.
> ...
>
> IMHO we should use the same for C++ gnu_inline functions,
> they are supposed to work the same as C gnu_inline functions
> as much as possible...
>
> Ok for trunk?

Yes this makes sense, but is gnu_inline attribute really marking the
function as GNU extern inline regardless of other storage class qualifiers?
Like for example

static inline __attribute__((gnu_inline)) int foo();

?  Because the docs read:

"This attribute should be used with a function which is also declared
with the @code{inline} keyword.  It directs GCC to treat the function
as if it were defined in gnu89 mode even when compiling in C99 or
gnu99 mode.

If the function is declared @code{extern}, then this definition of the
function is used only for inlining. ..."

suggesting that we apply DECL_DISREGARD_INLINE_LIMITS only
if DECL_EXTERNAL is set.  Of course you need to check if the C++
frontend really does so for

extern inline __attribute__((gnu_inline) void foo().

Richard.


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