This is the mail archive of the gcc@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: bug w/ inline of inline?



On Oct 17, 2004, at 8:18 PM, Zack Weinberg wrote:


Eliot Dresselhaus <edressel@cisco.com> writes:

In this example

static inline int f (int x) { return x + 1; }

    static inline int g (int x, inline int f (int x))
    { return 1 + f (x); }

    int h (int x)
    { return g (x, f); }

is h supposed to optimize to return x + 2 or supposed to actually call
f.

GCC is allowed to do either. It would be good if it produced "return x + 2;" Please file a missed-optimization bug report.

We have one already, PR 9079: <http://gcc.gnu.org/PR9079>.


Thanks,
Andrew Pinski
a gcc bug master


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