On Mon, Aug 29, 2022 at 2:01 AM Philip Guenther <guent...@gmail.com> wrote:
>
> On Sun, Aug 28, 2022 at 2:11 PM Anders Andersson <pipat...@gmail.com> wrote:
>>
>> On Sun, Aug 28, 2022 at 3:15 PM Jonathan Gray <j...@jsg.id.au> wrote:
>> >
>> > diff --git lib/libc/locale/wctoint.h lib/libc/locale/wctoint.h
>> > index ea50c5ae1b6..14c7f0c466d 100644
>> > --- lib/libc/locale/wctoint.h
>> > +++ lib/libc/locale/wctoint.h
>> > @@ -30,7 +30,7 @@
>> >   */
>> >
>> >
>> > -inline static int
>> > +static inline int
>> >  wctoint(wchar_t wc)
>> >  {
>> >         int n;
>> > [...]
>>
>> Why this change? As far as I can see, the standard allows for any order.
>
>
> C99 standard stated:
>     "The placement of a storage-class specifier other than at the beginning of 
> the declaration
>      specifiers in a declaration is an obsolescent feature.
>
> My recall is that it was officially removed in C11.
>
> ok guenther@

This intrigued me so I had to do some archaeology. The grammar allows
any random order from K&R first edition up to (and including) this
month's C23 draft, but the warning has been in there since the first
ANSI C standard (and is still in C23).

Maybe someone forgot to push for this, and no one dares to remove the warning.

Reply via email to