Re: [PATCH] Makefile: Yes. Finally remove '-Wdeclaration-after-statement'

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

 



On Mon, Aug 17, 2020 at 2:15 PM Eric W. Biederman <ebiederm@xxxxxxxxxxxx> wrote:
>
> Does anyone remember why we added this warning?  I had always thought
> it's purpose was to ensure we stayed within our chosen dialect of C.

As far as I'm concerned, that's the primary motivation.

I'm not seeing why we'd suddenly allow the "put variable declarations
anywhere" when we've been able to keep from doing it until now.

We're still building primarily good old K&R ANSI C, just with
extensions. Wild variable placement doesn't seem like a useful
extension.

(Other variable placement improvements are: block-scope variable
declarations inside the "for()" statement is very syntactically
useful, for example. THAT would be useful if we can finally enable it
without gcc going all wonky on us)

                Linus



[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux