bug-gnulib
[Top][All Lists]
Advanced

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

Re: [POLL] C99, declaration after statement


From: Gary V. Vaughan
Subject: Re: [POLL] C99, declaration after statement
Date: Sun, 25 Sep 2011 11:01:25 +0700

On 24 Sep 2011, at 21:26, Bruno Haible wrote:
> Jim Meyering wrote:
>> I will then do what I did for a few years with coreutils:
>> 
>>    Manually maintain a C99-to-C89 patch for each of the few .c files
>>    that deserve the effort, like fts.c.
>>    Then, people who require C89 sources can apply the patch manually.
>>    Or, who knows... maybe gnulib-tool will be extended to apply the
>>    patch for them, say when given a --c89 option.
> 
> What do the gnulib users think?
> 
> Can we have a poll?
> 
> 1) Is it important for you that what you get from gnulib can be compiled
>   with a C89 compiler (gcc 2.95, IRIX cc, MSVC)?

Yes.

gnulib has become an important part of the patching process we use to port 
upstream
packages to IRIX and others, particularly in the many cases where upstream does 
not
or cannot check that compilation works on other than Linux before releasing.

It's not an insurmountable issue to manually add a few inner braces to create 
new
scopes around what would otherwise be C99-only declarations, but it does add 
another
level of debugging and patching to an already painstaking process.

> 2) Is it important for you that gnulib-tool displays information about whether
>   what you imported from gnulib can be compiled with a C89 compiler?

Maybe.

Ideally, this wouldn't be necessary, because everything would continue to 
compile
correctly with only a C89 compiler available, but if it is otherwise 
unavoidable,
the earlier I find out that I have to patch some files to get them through the
compilation phase, the fewer times I have to go around the edit-compile-debug
cycle before everything works.

> 3) Is it important for you that you can tell gnulib-tool whether it should
>   accept or reject to import code from gnulib that cannot be compiled with
>   a C89 compiler?

Not at all.

If gnulib provides a C99 only module needed to help some other package I'm 
porting
to compile correctly, then it's less work to manually convert that module back 
to
C89 than to write a new workaround from scratch.  Either I need the module or 
not,
and I'll have to make it into C89 if I need it, whether or not gnulib ships it 
that
way to start with.

HTH,
-- 
Gary V. Vaughan (gary AT gnu DOT org)




reply via email to

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