On 04/16/2014 05:12 PM, Josh Triplett wrote:
On Tue, Apr 15, 2014 at 04:08:57PM -0700, Cody P Schafer wrote:
Makes sparse a little more accepting than the standard: we accept any
number of ["static", "restrict"] repeated in any order, while the n1570
specifies (in 6.7.6.2.3) that either type-qualifiers (ie: "restrict")
come first and are followed by "static" or the opposite ("static" then
type-qualifiers).
Also add a test.
Signed-off-by: Cody P Schafer <cody@xxxxxxxxxxxxxxxxxx>
What's the rationale for this? Why should sparse accept more than the
standard allows? What real-world code do you have that requires this?
And would it be worth adding a warning for this non-standards-compliant
code, even if that warning isn't on by default?
I could have sparse be just as strict as the standard, it just was just
(much) simpler to make it liberal in what it accepts. If you're fine
with some more verbose code, I'll put together something that is stricter.
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html