[ccan] ccan and C standards newer than gnu89

David Gibson david at gibson.dropbear.id.au
Fri Aug 21 06:57:14 AEST 2015


On Wed, Aug 19, 2015 at 11:54:43PM -0700, Hugh Blemings wrote:
> Hiya,
> 
> > On 19 Aug 2015, at 23:04, Rusty Russell <rusty at rustcorp.com.au> wrote:
> > 
> > Cody P Schafer <dev at codyps.com> writes:
> >> I while back, I submitted a module that depended on some c99 behavior
> >> (inline & extern inline) that isn't quite avalaible in gnu89, and as a
> >> result was rejected at the time.
> >> 
> >> Now that gcc has switched it's default to gnu11 (which includes the
> >> behavior of inline & extern inline I needed), I'm wondering if modules
> >> that need non-gnu89 features might be submittable.
> > 
> > Hmm, maybe it is time?  It's best if it doesn't completely break older
> > compilers though...
> 
> I apologise for framing this as a generality but I wonder if it's
> feasible to make this build time configurable so you can get some
> ccan goodness even with an older compiler, just not the newer
> modules ? Seek to confine the reliance on new functions as much as
> possible without hamstringing the whole endeavour perhaps.

The difficulty isn't new functions - they're easily filled in for old
compilers / libraries.  The problem is new syntax, and - worst of all
- changed semantics for existing syntax (like the meaning of "static
inline" and "extern inline").

It *can* generally be made built time configurable, but it usually
requires ugly macros scattered in an unpleasantly large number of
locations.

> I'm thinking this in the context of keeping ccan as useful as
> possible with older gcc versions or even non gcc compilers, both of
> which still get a bit of use in embedded systems/toolchains I think.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/ccan/attachments/20150820/0d6b0d8d/attachment.sig>


More information about the ccan mailing list