From: Matthias Andree <matthias.andree@gmx.de>
To: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: C99 types VS Linus types
Date: Mon, 7 Jul 2003 14:22:23 +0200 [thread overview]
Message-ID: <20030707122222.GE10021@merlin.emma.line.org> (raw)
In-Reply-To: <1057579305.747.79.camel@cube>
On Mon, 07 Jul 2003, Albert Cahalan wrote:
> > Speaking of shifting forward to standards:
> >
> > unsigned char foo = 42;
> > char bar[42];
> > sprintf(bar, "%ju", (uintmax_t)foo); // see IEEE Std 1003.1-2001
> >
> > If that's too ugly, write your own [u]intmax_t-to-char[]
> > converter, then only the stack is nasty if uintmax_t is 128
> > bits wide and you're printing an array uint8_t. :-P
>
> Yes, that is too ugly. It's idealistic code.
> Readability matters more than worrying about
> something which won't happen for over 40 years,
> and won't cause Y2K-style problems even then.
sprintf doesn't lend itself too well to readibility anyways, and we have
these crutches in gcc to check argument types and all that, not to speak
of %n and other time bombs.
--
Matthias Andree
next prev parent reply other threads:[~2003-07-07 12:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-07 12:01 Albert Cahalan
2003-07-07 12:22 ` Matthias Andree [this message]
2003-07-07 12:24 ` Alan Cox
-- strict thread matches above, loose matches on Subject: below --
2003-07-06 22:18 Albert Cahalan
2003-07-07 1:59 ` Matthias Andree
2003-07-06 5:03 Bernardo Innocenti
2003-07-06 12:23 ` Philippe Elie
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030707122222.GE10021@merlin.emma.line.org \
--to=matthias.andree@gmx.de \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®