[Top][All Lists]

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

Re: [avr-libc-dev] [bug #36921] util/delay.h uses inline...

From: Joerg Wunsch
Subject: Re: [avr-libc-dev] [bug #36921] util/delay.h uses inline...
Date: Mon, 23 Jul 2012 17:55:39 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

As Weddington, Eric wrote:

> The counter argument, though, is that C89 is already pretty old. Do
> we need to comply with that standard? Or are we just going to comply
> with the C99 standard?

> What is our policy?

The policy is to be as liberal as reasonably possible. ;-)

In the current case, replacing the "inline" by "__inline" (to force it
into the implementation namespace) is no big deal, so I'd take that
route.  OTOH, Dean Camera's <util/atomic.h> implementation would not
be possible that way without using the C99 addition to declare a
variable within a "for" statement, so we documented it that way.

Most of GCC's extensions are available even with -std=c89 mode, by
properly marking them as extensions, so that's what I meant with "as
liberal as reasonably possible".  It doesn't cost us anything, but
gives users the most possible flexibility.

Note that even GCC did not switch to default C99 mode yet; the default
mode is still (as of GCC 4.7) "gnu89".
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

reply via email to

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