All of lore.kernel.org
 help / color / mirror / Atom feed
From: Riley Williams <rhw@InfraDead.Org>
To: Manuel Novoa III <mjn3@codepoet.org>
Cc: Linux-8086 <linux-8086@vger.kernel.org>
Subject: Re: C compiler, assembler and linker
Date: Wed, 17 Jul 2002 07:33:33 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.21.0207170723060.4272-100000@Consulate.UFP.CX> (raw)
In-Reply-To: <20020717013106.GA5219@codepoet.org>

Hi Manuel.

> Didn't have time yesterday to generate the patch, but here it is.
> Some of the build changes only make sense if you aren't installing
> in the default locations as root.
>
> As a refresher, it adds #elif support, #warning support (for
> non-continued lines), asm() at file scope, limited support for
> recursive #define (#define stdin stdin), and more complete exclusion
> of the floating point related code when floats are disabled. This
> lets you build bcc for elks. As I mentioned earlier, it looks like
> the preprocessor works but it dies when trying to do code generation.

I'll have a look at it anyway...

>> Unfortunately, that's not actually true. It's very easy to prove
>> that bcc uses SIGNED chars if the unsigned keyword isn't
>> specifically given. Robert also states that bcc does not correctly
>> handle signed chars, so this default rather worries me.

> Can you send me a simple test app to illustrate this? Thanks.

Not needed in this case - just read through the declspec() function
definition and you see that bcc internally uses SIGNED types for
everything unless the unsigned keyword is specifically given. There is
absolutely nothing in there to make char different from int.

I mentioned this to Robert when I sent in the patch referred to above,
and he confirms that the language analyser does indeed select on that
basis. However, he implied that the code generator will use unsigned for
char even when the language analyser says they should be signed, so
there is presumably some hack for this that really wants to be removed.

The patch I enclosed last time simply adds the ability to select either
signed or unsigned in the language analyzer and end up with the correct
result. It doesn't touch any hack such as the above.

>> As it happens, I emailed a patch to Robert back on 6th June 2002
>> that added and correctly implemented the signed keyword in the
>> declspec function, thus dealing with most of the problem. There may
>> be a few corner cases left where signed will cause problems, but I
>> haven't seen any of them yet. I've attached a gzip'd copy of that
>> patch to this email for reference...

> I'm looking forward to trying out your patch in a few days when
> things slow down for me.

Many thanks.

Best wishes from Riley.


  reply	other threads:[~2002-07-17  6:33 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-14 14:05 C compiler, assembler and linker Harry Kalogirou
2002-07-14 17:27 ` Manuel Novoa III
2002-07-15  6:07   ` Riley Williams
2002-07-15 17:02     ` Manuel Novoa III
2002-07-15 19:13       ` Riley Williams
2002-07-15 22:02         ` Manuel Novoa III
2002-07-16  6:27           ` Riley Williams
2002-07-17  1:31             ` Manuel Novoa III
2002-07-17  6:33               ` Riley Williams [this message]
2002-07-18 12:03                 ` Minix vs. ELKS Feher Tamas
2002-07-18 12:27                   ` Javier Sedano
2002-07-02 15:07                     ` (unknown) Miguel A. Bolanos
2002-07-18 13:40                   ` Minix vs. ELKS Alan Cox
2002-07-22 21:41                 ` C compiler, assembler and linker Robert de Bath
2002-07-23  8:16               ` Robert de Bath
2002-07-23 16:25                 ` Manuel Novoa III
2002-07-23 19:09                   ` Robert de Bath
2002-07-24 21:17         ` More dev86 changes (0.16.5) Robert de Bath
2002-07-24 22:02           ` Riley Williams
2002-07-25 15:42             ` Manuel Novoa III
2002-07-26  7:55               ` Robert de Bath
2002-07-26 15:12                 ` Manuel Novoa III
2002-07-26  8:22             ` Robert de Bath
2002-07-24 22:26           ` Paul Nasrat
2002-07-25 16:34             ` Manuel Novoa III
2002-07-22 23:26       ` C compiler, assembler and linker Robert de Bath
2002-07-23  0:34         ` Riley Williams
2002-07-23  0:58           ` Manuel Novoa III
2002-07-23  0:46         ` Manuel Novoa III
2002-07-15 14:16 Ken Martwick
2002-07-15 19:21 ` Riley Williams

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=Pine.LNX.4.21.0207170723060.4272-100000@Consulate.UFP.CX \
    --to=rhw@infradead.org \
    --cc=linux-8086@vger.kernel.org \
    --cc=mjn3@codepoet.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.