avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-libc-dev] Can pgmspace.h __LPM_xxx__ macros become inlinefn's?


From: Theodore A. Roth
Subject: Re: [avr-libc-dev] Can pgmspace.h __LPM_xxx__ macros become inlinefn's?
Date: Thu, 30 Sep 2004 15:17:27 -0700 (PDT)

On Thu, 30 Sep 2004, Bill Somerville wrote:

> > Those seem like pretty good reasons for switching to inline functions to
> > me.
> >
> > If no one comes up with a strong reason against this, I have no
> > major objections.
> >
> > My only (very weak) objection is that I've found that gdb can not step
> > over an inlined function. That makes debugging a bit of a pain some
> > times.
>
> True, but this is a problem with gdb!

That's why it's a weak objection. ;-)

>
> >
> > Although, other advantages are type checking and the ability to step
> > through an inline function in the debugger when you need to see what it
> > is doing.
> >
> > One nit: should the function definition be "static __inline__ ..."
> > instead of just "__inline__ ..."?
>
> I'm not sure on this. The gcc man page implies that static is not
> recommended and definitely not required when C99 inline semantics are
> implemented. Perhaps the compiler guru's can give a definiitive answer.

I don't see anywhere that using static is not recommended. Do you have a
reference for that?

---
Ted Roth
PGP Key ID: 0x18F846E9
Jabber ID: address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]