Re: [PATCH] add function attributes to sprintf() and snprintf()

James Antill (james@and.org)
09 Nov 2001 00:24:34 -0500


Erik Mouw <J.A.K.Mouw@its.tudelft.nl> writes:

> Hi,
>
> This patch adds function attributes to sprintf() and snprintf() so the
> compiler can catch formatting errors at compile time. Patch is against
> 2.4.13-ac8, but it should apply cleanly against 2.4.14 as well.

This is done inside gcc as sprintf/snprintf/vsnprintf etc. are all
standard symbols so gcc automatically adds the attributes for them.

In gcc 3.x it's all done in gcc/builtin-attrs.def

-- 
# James Antill -- james@and.org
:0:
* ^From: .*james@and\.org
/dev/null
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/