News for hackers. Stuff that matters.
Re:Teardown of a Failed Linux LTS Spectre Fix by aidenn0 on Wednesday September 04, 2019 @11:30AM (#20878097)
Yeah, the blame is about 50-50 on C89/90 vs the developer. There are at least 2 different ways to fix the warning that are brainless and semantically identical:

  {
    SNIP1
    X Y = Z;
    SNIP2
  }
Either:

  {
    X Y;
    SNIP1
    Y=Z;
    SNIP2
  }
or

  {
    SNIP1
    {
      X Y = Z;
      SNIP2
    }
  }
But the need for doing this really should be removed; I agree that every compiler that can compile the linux kernel can compile the original code correctly and that most of them can do so without wholesale opting in to C99. Furthermore VLAs are the only truly crazy part of C99, so it would be nice to transition to C99 minus VLA, which is something that most compilers can enforce (gcc has -Wvla).

There are no comments on this comment yet.