public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Gabriel Paubert <paubert@iram.es>
To: viro@parcelfarce.linux.theplanet.co.uk
Cc: tom st denis <tomstdenis@yahoo.com>,
	Christoph Hellwig <hch@infradead.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [OT] Re: 0xdeadbeef vs 0xdeadbeefL
Date: Thu, 8 Jul 2004 13:55:11 +0200	[thread overview]
Message-ID: <20040708115511.GA4391@iram.es> (raw)
In-Reply-To: <20040708111521.GK12308@parcelfarce.linux.theplanet.co.uk>

On Thu, Jul 08, 2004 at 12:15:21PM +0100, viro@parcelfarce.linux.theplanet.co.uk wrote:
> On Thu, Jul 08, 2004 at 11:32:50AM +0200, Gabriel Paubert wrote:
> 
> > Yes, I know and I use BK. But given the fact that you insult me for 
> > better knowing C rules than you, I'm seriously considering switch 
> > to subversion or arch instead.
> > 
> > Argh, I've mentioned BK. There should be a Goldwin's law equivalent
> > for BitKeeper on lkml ;-)
> 
> Godwin, surely?

Right, should have looked the name up.

> 
> Anyway, if you think that suckversion authors knew C...  Try to read their
> decoder/parser/whatever you call the code handling the data stream obtained
> from other end of connection.  _Especially_ when it comes to signedness
> (of integers, mostly).

I did not read it, neither did I read BitKeeper's code for 
obvious reasons.

> 
> > - the aforementioned fgetc/getc/getchar issues.
> 
> ... have nothing to do with char; getc() has more legitimate return values
> than char can represent.  

Only one more, unless I missed something.

> No matter whether it's signed or unsigned, if
> you have
> 	... char c;
> 	...
> 	c = getc();
> you have a bug - Dirichlet Principle bites you anyway.

Indeed, but unfortunately you don't hit the problem with 
pure ASCII on x86. That's one of the reasons for which 
a lot of code ported to archs where char is unsigned by
default is simply compiled with -fsigned-char instead of 
correcting the bugs. 

The remaining case (char 0xff) is infrequent, at least 
for Latin-[19] encodings in the languages I know, and 
never happens with UTF-8 AFAICT. 

Heck, even the 2.4 ppc kernel is compiled with 
-fsigned-char, for $DEITY's sake. 

	Regards,
	Gabriel


  reply	other threads:[~2004-07-08 12:00 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-06 21:56 0xdeadbeef vs 0xdeadbeefL David Eger
2004-07-07  0:06 ` tom st denis
2004-07-07  3:00   ` viro
2004-07-07 11:10     ` tom st denis
2004-07-07 11:18       ` Prohibited attachment type (was 0xdeadbeef) Richard B. Johnson
2004-07-07 11:48         ` tom st denis
2004-07-07 12:29           ` Jakub Jelinek
2004-07-08  5:52             ` Pavel Machek
2004-07-08 14:03               ` Jakub Jelinek
2004-07-07 12:13         ` R. J. Wysocki
2004-07-07 14:22       ` 0xdeadbeef vs 0xdeadbeefL viro
2004-07-07 18:47         ` tom st denis
2004-07-07 16:30       ` Gabriel Paubert
2004-07-07 18:41         ` tom st denis
2004-07-07 18:47           ` Christoph Hellwig
2004-07-07 18:53             ` tom st denis
2004-07-07 23:17               ` Harald Arnesen
2004-07-08  6:15               ` David Weinehall
2004-07-08  9:32               ` [OT] " Gabriel Paubert
2004-07-08 11:15                 ` viro
2004-07-08 11:55                   ` Gabriel Paubert [this message]
2004-07-08 16:41                   ` Andries Brouwer
2004-07-08 17:13                     ` Michael Driscoll
2004-07-08 17:16           ` Horst von Brand
2004-07-10  1:52           ` Andrew Rodland
2004-07-07  0:38 ` Richard B. Johnson
2004-07-07  4:52   ` David Eger
2004-07-07 11:40     ` Richard B. Johnson

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=20040708115511.GA4391@iram.es \
    --to=paubert@iram.es \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tomstdenis@yahoo.com \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /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