From: "Andreas Vögele" <voegelas@gmx.net>
Subject: Re: More problems on HP-UX ... 6
Date: Wed, 28 Apr 2004 09:09:02 +0200 [thread overview]
Message-ID: <ED8F5245-98E2-11D8-9CE4-000D93673682@gmx.net> (raw)
In-Reply-To: <87ad0x9g5u.fsf@zip.com.au>
Kevin Ryde writes:
>> According to my copy of "Programming in C" it should be okay to
>> pass a char instead of an int to iscntrl() etc.
>
> I think it was meant to be an int. But if you're in 7-bit ascii then
> it doesn't make a difference.
Yes, but my German copy of "Programming in C, 2nd ed" says in section
A.6.1: "A character [...] can be used everywhere in an expression where
an integer object is required. [...]". And according to section A.7.3,
subscript array references are expressions.
>> backtrace.c: In function `display_frame_expr':
>> backtrace.c:403: warning: subscript has type `char'
>>
>> numbers.c: In function `mem2uinteger':
>> numbers.c:2337: warning: subscript has type `char'
>> ...
>
> Thanks, I'll add some casts to "int". They definitely want casts
> through "unsigned char", to protect against 8-bit values.
When I googled for the "subscripts has type char" problem I found a
statement that says that casts to "int" could "cause problems" on other
systems. Whatever that means.
Since the build only aborts if --enable-maintainer-mode, i.e. -Werror,
is enabled I'd probably keep the "char" values. BTW, I use only one
cast to fix this problem (in backtrace.c). In numbers.c I changed the
type of the variables to "int".
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile
next prev parent reply other threads:[~2004-04-28 7:09 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-26 21:30 More problems on HP-UX Andreas Vögele
2004-04-27 22:41 ` More problems on HP-UX ... 3 Kevin Ryde
2004-05-01 12:55 ` Andreas Vögele
2004-05-01 20:59 ` Kevin Ryde
2004-05-02 7:06 ` Andreas Vögele
2004-05-02 22:56 ` Kevin Ryde
2004-04-27 22:51 ` More problems on HP-UX ... 7 Kevin Ryde
2004-04-28 7:19 ` Andreas Vögele
2004-04-27 23:04 ` More problems on HP-UX ... 6 Kevin Ryde
2004-04-28 7:09 ` Andreas Vögele [this message]
2004-04-30 23:27 ` Kevin Ryde
2004-04-27 23:31 ` More problems on HP-UX ... 4 Kevin Ryde
2004-04-28 7:43 ` Andreas Vögele
2004-04-28 21:27 ` Andreas Vögele
2004-05-09 0:47 ` Kevin Ryde
2004-05-09 16:34 ` Andreas Vögele
2004-04-28 0:09 ` More problems on HP-UX ... 1 Kevin Ryde
2004-04-28 6:10 ` Andreas Vögele
2004-04-28 21:25 ` Andreas Vögele
2004-04-28 0:13 ` More problems on HP-UX ... 2 Kevin Ryde
2004-04-28 6:36 ` Andreas Vögele
2004-04-30 23:40 ` Kevin Ryde
2004-05-19 0:03 ` Kevin Ryde
2004-05-24 18:40 ` Marius Vollmer
2004-04-28 0:36 ` More problems on HP-UX ... macos Kevin Ryde
2004-04-28 7:59 ` Andreas Vögele
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ED8F5245-98E2-11D8-9CE4-000D93673682@gmx.net \
--to=voegelas@gmx.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).