lkml.org 
[lkml]   [2020]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [GIT PULL] EFI fixes
On Fri, Jul 10, 2020 at 12:09:36PM +0200, Arnd Bergmann wrote:
> On Thu, Jul 9, 2020 at 12:35 PM Kirill A. Shutemov <kirill@shutemov.name> wrote:
> >
> > On Thu, Jul 09, 2020 at 11:30:27AM +0200, Arnd Bergmann wrote:
> > > The most interesting version to require in the future would be
> > > gcc-7, which IIRC is the point at which we can just use -std=gnu99
> > > or -std=gnu11 instead of -std=gnu89 without running into the
> > > problem with compound literals[1].
> >
> > It is gcc-5, not gcc-7. This commit:
> >
> > https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=d303aeafa9b4
>
> Ok, glad I was wrong here. I confirmed that with gcc-5 or higher I
> can build a kernel with -std=gnu11 or -std=gnu99 instead of
> -std=gnu89, but gcc-4.9.4 fails with anything other than gnu89.
>
> I forgot why we care though -- is there any behavior of gnu11
> that we prefer over the gnu99 behavior, or is it just going with
> the times because it's the right thing to do? All the interesting
> features of c11 seem to also be available as extensions in
> gcc-4.9's gnu89, though I could not find a definite list of the
> differences.

Last time (llist_entry_safe() thread) it came up due to local variables in
loops feature that is not available for gnu89. Both gnu99 and gnu11 is
fine. Maybe we should leave it to default for the GCC (gnu17/gnu18 in
gcc-10).

--
Kirill A. Shutemov

\
 
 \ /
  Last update: 2020-07-10 13:01    [W:0.073 / U:0.948 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site