Re: RFC: always-inline vs unit-at-a-time

2005-03-15 Thread Zack Weinberg
Dale Johannesen <[EMAIL PROTECTED]> writes: >>> It seems undesirable for -O options to affect which programs will >>> compile. >> >> Agreed. Perhaps we should run the inliner at -O0 if we see >> always_inline attributes, just for those functions? > > We do; the problem is that it makes only 1 pas

Re: RFC: always-inline vs unit-at-a-time

2005-03-15 Thread Dale Johannesen
On Mar 15, 2005, at 10:32 AM, Zack Weinberg wrote: Dale Johannesen <[EMAIL PROTECTED]> writes: Consider the following: static inline int a() __attribute((always_inline)); static inline int b() __attribute((always_inline)); static inline int b() { a(); } static inline int a() { } int c() { b(); } Th

Re: RFC: always-inline vs unit-at-a-time

2005-03-15 Thread Zack Weinberg
Dale Johannesen <[EMAIL PROTECTED]> writes: > Consider the following: > > static inline int a() __attribute((always_inline)); > static inline int b() __attribute((always_inline)); > > static inline int b() { a(); } > static inline int a() { } > int c() { b(); } > > This compiles fine at -O2. At -

RFC: always-inline vs unit-at-a-time

2005-03-15 Thread Dale Johannesen
Consider the following: static inline int a() __attribute((always_inline)); static inline int b() __attribute((always_inline)); static inline int b() { a(); } static inline int a() { } int c() { b(); } This compiles fine at -O2. At -O0 we get the baffling error sorry, unimplemented: inlining fai