bison-patches
[Top][All Lists]
Advanced

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

Re: [PATCH 0/5] {maint} restore C90 compliance


From: Akim Demaille
Subject: Re: [PATCH 0/5] {maint} restore C90 compliance
Date: Thu, 13 Dec 2012 09:36:34 +0100

Le 12 déc. 2012 à 21:12, Paul Eggert <address@hidden> a écrit :

> On 12/12/12 05:15, Akim Demaille wrote:
>> So... does anybody still care about C90?
> 
> Yes, but it's more about features, and not about full conformance.
> 
> For coreutils we've been using declarations-after-statements
> (one of the C99 features you just yanked from Bison),
> and asking people to stick to compilers that support that particular
> C99 feature.  A few complain, but these days I get the impression
> that most of these complaints are by people who are doing porting
> testing (i.e., testing for portability to C89) than doing actual use.
> 
> We don't assume all C99 features for coreutils, though, in particular,
> not the C99 library.  It's easier to ask people to use GCC than to
> ask them to use a library that conforms to C99 or later.
> 
> For example, the most recent email I sent to bug-gnulib was about
> the OS X C library's failure to support C99 extern inline functions
> properly, a fallout from your earlier bug report vis a vis extern
> inline.  That is, even for the latest version of OS X, one cannot
> assume full C99 support and must revert to C89 in some cases.

Thanks for the details report Paul!

Are these assumptions written down somewhere?  I have looked in the
GCS and in the various bits of gnulib to find some statement about
the current admissible requirements, but I found nothing really
interesting.  Except that KnR is still mentioned (GCS):

>    However, it is easy to support pre-standard compilers in most
> programs, so if you know how to do that, feel free.  If a program you
> are maintaining has such support, you should try to keep it working.
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ !!!
> 
>    To support pre-standard C, instead of writing function definitions in
> standard prototype form,
> 
>      int
>      foo (int x, int y)
>      ...
> 
> write the definition in pre-standard style like this,
> 
>      int
>      foo (x, y)
>           int x, y;
>      ...
> 
> and use a separate declaration to specify the argument prototype:
> 
>      int foo (int, int);

I'll ask for the removal of this part, it makes no sense today.




reply via email to

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