> Date: Tue, 8 Jul 2014 11:17:35 -0700 > From: Matthew Dempsky <[email protected]> > > Diff below converts the kernel to build with -std=gnu99. (For > simplicity, I've only included amd64 for now, but I'll make the same > change to all kernel Makefiles if this is ok.) > > The only incompatibility (that I'm aware of) is that ISO C99's inline > semantics differ slightly from GNU C89's historical (but non-standard) > inline semantics, but I believe the diff below keeps us consistent > with the semantics the kernel currently assumes. (More details > below.) > > I've tested on amd64 and I get the exact same .o files with or without > this change (except vers.o, but only because of timestamping). It's > probably worth conducting the same test on one of our GCC 3 > architectures. > > ok?
I disagree with this diff. We should discourage the use of GNU extensions in our kernel. Therefore I think std=gnu99 would give the wrong signal. As for the inline issue. IMHO, given the incompatbility problems between ISO C and GNU C, only "static inline" is usable. The semantics of the other inline "forms" is just too confusing. The occasional extra copy of the code is as far as I'm concerned acceptable. The functions should be small enough for it not to matter.
