Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #40865] [TODO] ensure isxxx() and toxxx() are only passed unsigned char values

10 views
Skip to first unread message

Chip Salzenberg

unread,
Nov 13, 2006, 5:24:04 PM11/13/06
to bugs-bi...@rt.perl.org
# New Ticket Created by Chip Salzenberg
# Please include the string: [perl #40865]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40865 >


The C standard says that the isxxx() and toxxx() functions are only defined
if their input falls in the domain of unsigned char, or the special case of
-1 ("EOF"). Therefore, all input values to these functions should be cast
(directly or indirectly) to type unsigned char.

This is a good cage cleaner task, and should be repeated periodically.
--
Chip Salzenberg <ch...@pobox.com>

Paul Cochrane via RT

unread,
Jul 22, 2007, 5:10:32 AM7/22/07
to perl6-i...@perl.org
On Mon Nov 13 14:24:04 2006, chip wrote:
> The C standard says that the isxxx() and toxxx() functions are only
defined
> if their input falls in the domain of unsigned char, or the special
case of
> -1 ("EOF"). Therefore, all input values to these functions should be
cast
> (directly or indirectly) to type unsigned char.
>
> This is a good cage cleaner task, and should be repeated periodically.

Added two tests to check that this is done explicitly. Namely:

t/codingstd/check_isxxx.t and t/codingstd/check_toxxx.t

Also explicitly cast all instances of these functions as picked up by
the tests in several commits culminating in r20095.

Should the tests be added to the default coding standards tests run
with the main test harness?

Is it ok to close this ticket now?

Paul Cochrane via RT

unread,
Aug 5, 2007, 7:29:23 AM8/5/07
to perl6-i...@perl.org
Since we now have tests covering this issue, and the instances in the
code have been cleaned up, I'm now closing this ticket.
0 new messages