This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: possible patch
- To: Phil Edwards <pedwards at jaj dot com>
- Subject: Re: possible patch
- From: Jason Merrill <jason at cygnus dot com>
- Date: 26 Mar 2000 22:18:31 -0800
- Cc: martin at loewis dot home dot cs dot tu-berlin dot de, libstdc++ at sourceware dot cygnus dot com
- References: <200003262313.SAA12653@jaj.com>
>>>>> Phil Edwards <pedwards@jaj.com> writes:
>> I wonder why library compilation needs -Winline at all. When you write
>> the library functions, you tag some as 'inline' based on your
>> experience with the C++ language, just as you make other
>> implementation decisions. It is not a serious problem if you mark some
>> functions with inline that can't be inlined.
> Just for the record, the functions in question aren't marked as inline;
> they are defined in the header. As Benjamin pointed out, -O2 is where the
> new inliner starts working on those kinds of functions. The other kind,
> which must be marked as inline, get it at -O3.
> (Unless I'm completely wrong again.)
Well, yes, you and Benjamin. The new inliner is conditional on
flag_no_inline, which is conditional on -O, not -O2. All functions defined
within a class are implicitly declared 'inline' unless -fno-default-inline
is specified. -O3 implies -finline-functions, which means to consider for
inlining functions which were not actually declared inline.
Jason