|
|
Log in / Subscribe / Register

grsecurity: Teardown of a Failed Linux LTS Spectre Fix

grsecurity: Teardown of a Failed Linux LTS Spectre Fix

Posted Sep 4, 2019 11:20 UTC (Wed) by Wol (subscriber, #4433)
In reply to: grsecurity: Teardown of a Failed Linux LTS Spectre Fix by niner
Parent article: grsecurity: Teardown of a Failed Linux LTS Spectre Fix

But IS IT compiled as C90?

Or is the compiler merely saying "if you feed this to a C90 compiler, it will fail ..."

Cheers,
Wol


to post comments

grsecurity: Teardown of a Failed Linux LTS Spectre Fix

Posted Sep 4, 2019 11:28 UTC (Wed) by edomaur (subscriber, #14520) [Link]

It is. It's "C89+extensions".

grsecurity: Teardown of a Failed Linux LTS Spectre Fix

Posted Sep 4, 2019 12:48 UTC (Wed) by Paf (subscriber, #91811) [Link] (1 responses)

I’m pretty sure this restriction - which I do think adds value but I’m not going in that particular bikeshed - is part of all the C specs *since* C90, so... yeah. No issue with supporting old compilers. So if you want to get rid of it, you will have to go in that specific bikeshed. It says “standards committee” on the side, and I hear they keep dogs inside. Big, angry ones.

grsecurity: Teardown of a Failed Linux LTS Spectre Fix

Posted Sep 4, 2019 12:57 UTC (Wed) by niner (guest, #26151) [Link]

From gcc(1): "Warn when a declaration is found after a statement in a block. This construct, known from C++, was introduced with ISO C99 and is by default allowed in GCC. It is not supported by ISO C90."

So old C versions required all declarations to appear first in a block. C++ removed that requirement and the ISO standards committee backported that relaxation of the rules to C99.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds