Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

If God is perfect, why did He create discontinuous functions?


devel / comp.lang.c / bart cc32n.c

SubjectAuthor
* bart cc32n.cPaul Edwards
+* Re: bart cc32n.cJanis Papanagnou
|`* Re: bart cc32n.cPaul Edwards
| +* Re: bart cc32n.cbart
| |`* Re: bart cc32n.cScott Lurndal
| | `- Re: bart cc32n.cbart
| +* Re: bart cc32n.cDavid Brown
| |+- Re: bart cc32n.cKaz Kylheku
| |+* Re: bart cc32n.cbart
| ||+* Re: bart cc32n.cDavid Brown
| |||`* Re: bart cc32n.cPaul Edwards
| ||| `* Re: bart cc32n.cDavid Brown
| |||  `* Re: bart cc32n.cbart
| |||   +* Re: bart cc32n.cDavid Brown
| |||   |`- Re: bart cc32n.cJanis Papanagnou
| |||   +* Re: bart cc32n.cKenny McCormack
| |||   |+- Re: bart cc32n.cbart
| |||   |+* Re: bart cc32n.cMalcolm McLean
| |||   ||`- Re: bart cc32n.cDavid Brown
| |||   |`- Re: bart cc32n.cJanis Papanagnou
| |||   `* Re: bart cc32n.cKaz Kylheku
| |||    `- Re: bart cc32n.cbart
| ||`- Re: bart cc32n.cJohn McCue
| |`* Re: bart cc32n.cPaul Edwards
| | `* Re: bart cc32n.cDavid Brown
| |  +* Re: bart cc32n.cbart
| |  |`* Re: bart cc32n.cKaz Kylheku
| |  | `- Re: bart cc32n.cbart
| |  `* Re: bart cc32n.cPaul Edwards
| |   +* Re: bart cc32n.cDavid Brown
| |   |+* Re: bart cc32n.cbart
| |   ||`* Re: bart cc32n.cDavid Brown
| |   || +* Re: bart cc32n.cbart
| |   || |+- Re: bart cc32n.cKaz Kylheku
| |   || |`* Re: bart cc32n.cDavid Brown
| |   || | `* [meta] Re: bart cc32n.cJanis Papanagnou
| |   || |  +- Re: [meta] Re: bart cc32n.cbart
| |   || |  `- Re: [meta] Re: bart cc32n.cDavid Brown
| |   || `* Re: bart cc32n.cPaul Edwards
| |   ||  `- Re: bart cc32n.cDavid Brown
| |   |`* Re: bart cc32n.cPaul Edwards
| |   | `- Re: bart cc32n.cDavid Brown
| |   +* Re: bart cc32n.cTim Rentsch
| |   |`* Re: bart cc32n.cbart
| |   | +- Re: bart cc32n.cMalcolm McLean
| |   | `* Re: bart cc32n.cTim Rentsch
| |   |  `* Re: bart cc32n.cbart
| |   |   +- Re: bart cc32n.cKaz Kylheku
| |   |   `* Re: bart cc32n.cTim Rentsch
| |   |    `* Re: bart cc32n.cKenny McCormack
| |   |     `- Re: bart cc32n.cTim Rentsch
| |   `* Re: bart cc32n.cKaz Kylheku
| |    `* Re: bart cc32n.cKenny McCormack
| |     `- Re: bart cc32n.cDavid Brown
| `* Re: bart cc32n.cJanis Papanagnou
|  `- Re: bart cc32n.cPaul Edwards
`* Re: bart cc32n.cbart
 +- Re: bart cc32n.cPaul Edwards
 +* Re: bart cc32n.cPaul Edwards
 |`* Re: bart cc32n.cPaul Edwards
 | `- Re: bart cc32n.cPaul Edwards
 `* Re: bart cc32n.cbart
  `* Re: bart cc32n.cbart
   `* Re: bart cc32n.cKeith Thompson
    `- Re: bart cc32n.cPaul Edwards

Pages:123
bart cc32n.c

<up00qe$2pg54$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31734&group=comp.lang.c#31734

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.samoylyk.net!newsfeed.xs3.de!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mutazi...@gmail.com (Paul Edwards)
Newsgroups: comp.lang.c
Subject: bart cc32n.c
Date: Fri, 26 Jan 2024 18:16:44 +0800
Organization: A noiseless patient Spider
Lines: 116
Message-ID: <up00qe$2pg54$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 26 Jan 2024 10:16:46 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ee39b9694a5b24eb3ce05777bdfd9f69";
logging-data="2932900"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/3dSdB2nWizkL7B7stPQUXjKuQ05wxFSA="
User-Agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:s3Qw1VH75CFoT7diocqFgeeab4c=
X-Mozilla-News-Host: news://news.eternal-september.org:119
 by: Paul Edwards - Fri, 26 Jan 2024 10:16 UTC

Hi Bart (or anyone else interested)

(and hopefully this doesn't start a 3 month
long thread about ... what?)

You posted a flavor of cc64.c called cc32n.c,
which is available from http://pdos.org/cc32n.c

My understanding is that this can be compiled
with 32-bit gcc and produce a 32-bit executable
that produces 64-bit code.

The instructions say to compile with gcc or tcc.
I tried with gcc 3.2 from cygwin. I also tried
using visual studio 2005.

Note that I'm running on Windows 2000 (under
Virtualbox under KylinOS).

cygwin of that vintage (or at least the components
I installed) doesn't have stdint.h, but I have my own.

D:\devel\pdos\cc64>gcc --version
gcc (GCC) 3.2 20020927 (prerelease)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

D:\devel\pdos\cc64>gcc -I. -D__NOCWINTTYPES cc32n.c
cc32n.c: In function `mlib_checkfreelists':
cc32n.c:10243: warning: decimal constant is so large that it is unsigned
cc32n.c: In function `cc_lex_readhex':
cc32n.c:13173: warning: decimal constant is so large that it is unsigned
cc32n.c: In function `cc_lex_readdecimal':
cc32n.c:13423: warning: decimal constant is so large that it is unsigned
cc32n.c: In function `cc_lex_setnumberoffset':
cc32n.c:15385: warning: decimal constant is so large that it is unsigned
cc32n.c: In function `cc_parse_createnegop':
cc32n.c:19900: warning: decimal constant is so large that it is unsigned
cc32n.c: In function `cc_parse_eval_convert':
cc32n.c:20420: warning: decimal constant is so large that it is unsigned
cc32n.c: In function `cc_genasm_do_and':
cc32n.c:26616: warning: decimal constant is so large that it is unsigned
cc32n.c: In function `cc_genasm_do_or':
cc32n.c:26628: warning: decimal constant is so large that it is unsigned
cc32n.c: In function `cc_genasm_do_xor':
cc32n.c:26640: warning: decimal constant is so large that it is unsigned
cc32n.c: In function `cc_genasm_convertimm':
cc32n.c:27135: warning: decimal constant is so large that it is unsigned
cc32n.c:27145: warning: decimal constant is so large that it is unsigned
cc32n.c: In function `ax_genss_isdwordsized':
cc32n.c:31450: warning: decimal constant is so large that it is unsigned
cc32n.c: In function `ax_genss_do_arith':
cc32n.c:31772: warning: decimal constant is so large that it is unsigned
cc32n.c:31772: warning: decimal constant is so large that it is unsigned
cc32n.c: In function `ax_genss_do_mov':
cc32n.c:31863: warning: decimal constant is so large that it is unsigned
cc32n.c:31886: warning: decimal constant is so large that it is unsigned
cc32n.c:31940: warning: decimal constant is so large that it is unsigned
cc32n.c: In function `ax_writeexe_writesectionheader':
cc32n.c:33685: warning: decimal constant is so large that it is unsigned
cc32n.c:33688: warning: decimal constant is so large that it is unsigned
cc32n.c:33694: warning: decimal constant is so large that it is unsigned
cc32n.c: In function `ax_writeobj_writecoff':
cc32n.c:35811: warning: decimal constant is so large that it is unsigned
cc32n.c:35818: warning: decimal constant is so large that it is unsigned

D:\devel\pdos\cc64>

D:\devel\pdos\cc64>type world.c
int printf(char *x, ...);
int main(void)
{ printf("hello, world\n");
return 0;
}

D:\devel\pdos\cc64>a -c world.c
Compiling world.c to world.obj
0 00000000
SS code gen error: 1:exceeding word32 value
On line: 11

D:\devel\pdos\cc64>

Am I doing something wrong?

Note that although Kylin OS is 64-bit and
has 64-bit gcc, Windows 2000 is not. So I
am hoping to produce a 64-bit PE executable
that takes the MSABI registers and then
(using custom assembler) puts them into
appropriate registers to do a Linux syscall
(no libraries, including glibc, are ever
used). And use objcopy to convert from PE to ELF.

This will give me a pseudo-bios (suitable for
putting into an APK (see PdAndro at pdos.org)
or running directly from Linux x64), which can
then handle either pdos-generic executables, or
64-bit msvcrt.dll-based executables (similar
to UCX64).

Note that the 32-bit x86 executable in UC386L
is already capable of running those limited
win32 executables.

Thanks. Paul.

Re: bart cc32n.c

<up02vm$2pqh4$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31735&group=comp.lang.c#31735

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.lang.c
Subject: Re: bart cc32n.c
Date: Fri, 26 Jan 2024 11:53:42 +0100
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <up02vm$2pqh4$1@dont-email.me>
References: <up00qe$2pg54$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 26 Jan 2024 10:53:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="221c8d781fbecbe2e1ab4572c9275c3b";
logging-data="2943524"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18qJNr6KwbK/7HI/irRzvv/"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:wcQ9WpqRdN3+SMyzibCmJkJ8wkY=
In-Reply-To: <up00qe$2pg54$1@dont-email.me>
 by: Janis Papanagnou - Fri, 26 Jan 2024 10:53 UTC

On 26.01.2024 11:16, Paul Edwards wrote:
> Hi Bart (or anyone else interested)
>
> (and hopefully this doesn't start a 3 month
> long thread about ... what?)

Looks like a support question for a piece of proprietary code.

Why don't you contact the author or issue a bug report?

Re: bart cc32n.c

<up0377$2prul$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31736&group=comp.lang.c#31736

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mutazi...@gmail.com (Paul Edwards)
Newsgroups: comp.lang.c
Subject: Re: bart cc32n.c
Date: Fri, 26 Jan 2024 18:57:42 +0800
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <up0377$2prul$1@dont-email.me>
References: <up00qe$2pg54$1@dont-email.me> <up02vm$2pqh4$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 26 Jan 2024 10:57:44 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ee39b9694a5b24eb3ce05777bdfd9f69";
logging-data="2944981"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Df9022oxRQSuMpaCk3kla6I2vXv3gmJI="
User-Agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:Opq8QPRSK+HEL79pJzBiLDbg/PQ=
In-Reply-To: <up02vm$2pqh4$1@dont-email.me>
 by: Paul Edwards - Fri, 26 Jan 2024 10:57 UTC

On 26/01/24 18:53, Janis Papanagnou wrote:
> On 26.01.2024 11:16, Paul Edwards wrote:
>> Hi Bart (or anyone else interested)
>>
>> (and hopefully this doesn't start a 3 month
>> long thread about ... what?)
>
> Looks like a support question for a piece of proprietary code.

It's as far from proprietary as possible - it's
public domain. Without the hassle of having to
wait for the author to die and then waiting
another 70 years for him to properly decompose.

> Why don't you contact the author or issue a bug report?

It's public domain. You're the owner as much as
anyone else. And if you think it's a bug, then
I've just given you a bug report.

BFN. Paul.

Re: bart cc32n.c

<up03k3$2purb$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31737&group=comp.lang.c#31737

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (bart)
Newsgroups: comp.lang.c
Subject: Re: bart cc32n.c
Date: Fri, 26 Jan 2024 11:04:34 +0000
Organization: A noiseless patient Spider
Lines: 58
Message-ID: <up03k3$2purb$1@dont-email.me>
References: <up00qe$2pg54$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 26 Jan 2024 11:04:35 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="38be6987c435270cdfd924b8829a331d";
logging-data="2947947"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19aL1xkZ4cv+SL/FizOAZZGA7reJzxGt/g="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:rXGsiGSKBzWYd6GQVObECxneHmg=
Content-Language: en-GB
In-Reply-To: <up00qe$2pg54$1@dont-email.me>
 by: bart - Fri, 26 Jan 2024 11:04 UTC

On 26/01/2024 10:16, Paul Edwards wrote:
> Hi Bart (or anyone else interested)
>
> (and hopefully this doesn't start a 3 month
> long thread about ... what?)
>
>
> You posted a flavor of cc64.c called cc32n.c,
> which is available from http://pdos.org/cc32n.c
>
> My understanding is that this can be compiled
> with 32-bit gcc and produce a 32-bit executable
> that produces 64-bit code.
>
> The instructions say to compile with gcc or tcc.
> I tried with gcc 3.2 from cygwin. I also tried
> using visual studio 2005.

This must be a pretty old program, as I haven't supported a 32-bit C
target for years.

I can't remember how much testing I did on it. At the moment, my gcc
(13.2.0) can compile it but can't link a 32-bit program.

Only TCC can produce an executable. Both gcc and tcc need the -m32
option as the versions I have default to 64 bits. Neither show those
warnings.

But when I produce c32.exe, that crashes compiling hello.c using -E, -S,
-c or -exe (-exe is not viable anyway, as this 32-bit c32.exe needs to
load a 64-bit msvcrt.dll).

It does however build your minimal program:

c:\cx>c32 -c world
Compiling world.c to world.obj

c:\cx>gcc world.obj

c:\cx>a
hello, world

I don't get the error about '0' exceeding some bounds.

Note that world.obj contains 64-bit code and gcc turns it into a 64-bit
program.

I wouldn't really trust this version at all. Those 32-bit pointer fields
in those structs, with or without 'pack(1)', look a little dubious.

If you like, I can spend an hour or two working with this C code trying
to find the cause of the crashing, but when it's built with my 'tcc -m32'.

Your gcc 3.2 appears to produce different behaviour. I can't test with
that unless you can make that available somehow. But I expect that gcc
3.2 is not a single EXE like the stuff I do, so that is not so easy.

Re: bart cc32n.c

<up03s6$2purb$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31738&group=comp.lang.c#31738

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.samoylyk.net!hugayda.aid.in.ua!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (bart)
Newsgroups: comp.lang.c
Subject: Re: bart cc32n.c
Date: Fri, 26 Jan 2024 11:08:54 +0000
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <up03s6$2purb$2@dont-email.me>
References: <up00qe$2pg54$1@dont-email.me> <up02vm$2pqh4$1@dont-email.me>
<up0377$2prul$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 26 Jan 2024 11:08:54 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="38be6987c435270cdfd924b8829a331d";
logging-data="2947947"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+wG/9t6WOYPWFCbaS02WxhyGAEy0UChgM="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:KARDro/4WD/5VVR41b708guXvIc=
In-Reply-To: <up0377$2prul$1@dont-email.me>
Content-Language: en-GB
 by: bart - Fri, 26 Jan 2024 11:08 UTC

On 26/01/2024 10:57, Paul Edwards wrote:
> On 26/01/24 18:53, Janis Papanagnou wrote:
>> On 26.01.2024 11:16, Paul Edwards wrote:
>>> Hi Bart (or anyone else interested)
>>>
>>> (and hopefully this doesn't start a 3 month
>>> long thread about ... what?)
>>
>> Looks like a support question for a piece of proprietary code.
>
> It's as far from proprietary as possible - it's
> public domain. Without the hassle of having to
> wait for the author to die and then waiting
> another 70 years for him to properly decompose.
>
>> Why don't you contact the author or issue a bug report?
>
> It's public domain. You're the owner as much as
> anyone else. And if you think it's a bug, then
> I've just given you a bug report.

JP and I had an argument so he (I assume) has it in for me.

Re: bart cc32n.c

<up0479$2q1ut$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31739&group=comp.lang.c#31739

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.samoylyk.net!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mutazi...@gmail.com (Paul Edwards)
Newsgroups: comp.lang.c
Subject: Re: bart cc32n.c
Date: Fri, 26 Jan 2024 19:14:47 +0800
Organization: A noiseless patient Spider
Lines: 50
Message-ID: <up0479$2q1ut$1@dont-email.me>
References: <up00qe$2pg54$1@dont-email.me> <up03k3$2purb$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 26 Jan 2024 11:14:49 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ee39b9694a5b24eb3ce05777bdfd9f69";
logging-data="2951133"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+vYCHeUUxJ5iXss6ENpzR6YX5i5nIxdRA="
User-Agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:f9n7kxP4Q9hxI3J224yaEGbjTg8=
In-Reply-To: <up03k3$2purb$1@dont-email.me>
 by: Paul Edwards - Fri, 26 Jan 2024 11:14 UTC

On 26/01/24 19:04, bart wrote:
> On 26/01/2024 10:16, Paul Edwards wrote:

Hi Bart.

I'm expecting to do 3 separate replies to
this message, as I gather/digest the required
information.

Here's the first bit:

> Your gcc 3.2 appears to produce different behaviour. I can't test with
> that unless you can make that available somehow. But I expect that gcc
> 3.2 is not a single EXE like the stuff I do, so that is not so easy.

I have gcc 3.2.3 as a single executable, so
I'll get back to you later on that.

In the meantime, I can make gcc 3.2 available:

This is what I did (uncompress in order)

# with manual install from 4 individual packages
# (cygwin, binutils, gcc, w32api - in that order,
# with overwrite).

# The (old) cygwin packages used to build this were obtained from:
# #
https://web.archive.org/web/20030216221913/http://mirrors.rcn.com/pub/sourceware/cygwin/release/cygwin/cygwin-1.3.20-1.tar.bz2
#
https://web.archive.org/web/20030405055233/http://mirrors.rcn.com/pub/sourceware/cygwin/release/cygwin/cygwin-1.3.20-1-src.tar.bz2

#
#
https://web.archive.org/web/20030216230006/http://mirrors.rcn.com/pub/sourceware/cygwin/release/binutils/binutils-20021117-1.tar.bz2
#
https://web.archive.org/web/20030216230006/http://mirrors.rcn.com/pub/sourceware/cygwin/release/binutils/binutils-20021117-1-src.tar.bz2
# #
https://web.archive.org/web/20030330170119/http://mirrors.rcn.com/pub/sourceware/cygwin/release/gcc/gcc-3.2-3.tar.bz2
#
https://web.archive.org/web/20030405070436/http://mirrors.rcn.com/pub/sourceware/cygwin/release/gcc/gcc-3.2-3-src.tar.bz2
# #
https://web.archive.org/web/20040223120154/http://cygwin.get-software.com/release/w32api/w32api-2.2-1.tar.bz2
#
https://web.archive.org/web/20040204103925/http://cygwin.get-software.com/release/w32api/w32api-2.2-1-src.tar.bz2

Re: bart cc32n.c

<up05k1$2q9eq$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31740&group=comp.lang.c#31740

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.samoylyk.net!nyheter.lysator.liu.se!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mutazi...@gmail.com (Paul Edwards)
Newsgroups: comp.lang.c
Subject: Re: bart cc32n.c
Date: Fri, 26 Jan 2024 19:38:39 +0800
Organization: A noiseless patient Spider
Lines: 105
Message-ID: <up05k1$2q9eq$1@dont-email.me>
References: <up00qe$2pg54$1@dont-email.me> <up03k3$2purb$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 26 Jan 2024 11:38:41 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ee39b9694a5b24eb3ce05777bdfd9f69";
logging-data="2958810"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+/hRszWGRvlcbqgvInv5yjLAECt9Rfn78="
User-Agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:9HfRP6gDb7zgpy0+eX2RRoY1T0M=
In-Reply-To: <up03k3$2purb$1@dont-email.me>
 by: Paul Edwards - Fri, 26 Jan 2024 11:38 UTC

On 26/01/24 19:04, bart wrote:
> On 26/01/2024 10:16, Paul Edwards wrote:

> Your gcc 3.2 appears to produce different behaviour. I can't test with
> that unless you can make that available somehow. But I expect that gcc
> 3.2 is not a single EXE like the stuff I do, so that is not so easy.

I have uploaded a http://pdos.org/bart.zip

It's about 5 MB in size and has a snapshot of
my development environment.

If you go to pdos\cc64 you will find a makefile.hybrid

Also there is a single gccwin.exe for the compiler.

Maybe when you talked about "single executable"
you mean "embedded assembler and linker". I thought
you meant "no DLLs", so I thought I could provide
that (there is no DLL unless you count the reference
to msvcrt.dll).

This cc32n.c is slightly changed as I needed to
comment out the non-C90 includes present in the original.

Regardless, this is a switch from cygwin gcc 3.2
to my own build of a slightly modified gcc 3.2.3,
with gcc 3.2.3 being a single executable.

makefile.hybrid also calls cygwin gcc to do the
link, as it is more convenient.

D:\devel\pdos\cc64>pdmake -f makefile.hybrid
gccwin -S -fno-common -DBLDGENERIC -D__WIN32__ -D__CC64__ -I . -I
.../pdpclib -o cc32n.s cc32n.c
cc32n.c: In function `mlib_checkfreelists':
cc32n.c:10243: warning: decimal constant is so large that it is unsigned
cc32n.c: In function `cc_lex_readhex':
cc32n.c:13173: warning: decimal constant is so large that it is unsigned
cc32n.c: In function `cc_lex_readdecimal':
cc32n.c:13423: warning: decimal constant is so large that it is unsigned
cc32n.c: In function `cc_lex_setnumberoffset':
cc32n.c:15385: warning: decimal constant is so large that it is unsigned
cc32n.c: In function `cc_parse_createnegop':
cc32n.c:19900: warning: decimal constant is so large that it is unsigned
cc32n.c: In function `cc_parse_eval_convert':
cc32n.c:20420: warning: decimal constant is so large that it is unsigned
cc32n.c: In function `cc_genasm_do_and':
cc32n.c:26616: warning: decimal constant is so large that it is unsigned
cc32n.c: In function `cc_genasm_do_or':
cc32n.c:26628: warning: decimal constant is so large that it is unsigned
cc32n.c: In function `cc_genasm_do_xor':
cc32n.c:26640: warning: decimal constant is so large that it is unsigned
cc32n.c: In function `cc_genasm_convertimm':
cc32n.c:27135: warning: decimal constant is so large that it is unsigned
cc32n.c:27145: warning: decimal constant is so large that it is unsigned
cc32n.c: In function `ax_genss_isdwordsized':
cc32n.c:31450: warning: decimal constant is so large that it is unsigned
cc32n.c: In function `ax_genss_do_arith':
cc32n.c:31772: warning: decimal constant is so large that it is unsigned
cc32n.c:31772: warning: decimal constant is so large that it is unsigned
cc32n.c: In function `ax_genss_do_mov':
cc32n.c:31863: warning: decimal constant is so large that it is unsigned
cc32n.c:31886: warning: decimal constant is so large that it is unsigned
cc32n.c:31940: warning: decimal constant is so large that it is unsigned
cc32n.c: In function `ax_writeexe_writesectionheader':
cc32n.c:33685: warning: decimal constant is so large that it is unsigned
cc32n.c:33688: warning: decimal constant is so large that it is unsigned
cc32n.c:33694: warning: decimal constant is so large that it is unsigned
cc32n.c: In function `ax_writeobj_writecoff':
cc32n.c:35811: warning: decimal constant is so large that it is unsigned
cc32n.c:35818: warning: decimal constant is so large that it is unsigned
as -o cc32n.obj cc32n.s
rm -f cc32n.s
gcc -o cc64.exe cc32n.obj

D:\devel\pdos\cc64>

Same result:

D:\devel\pdos\cc64>cc64 -c world.c
Compiling world.c to world.obj
0 00000000
SS code gen error: 1:exceeding word32 value
On line: 11

D:\devel\pdos\cc64>

I need to do some more work before I can
use gccwin without using anything in cygwin,
because cc32n.c uses 64-bit values and my
support routines exist, but don't work
properly, so need to be debugged first.
That's why I switched to Visual Studio 2005
Professional first, and later to cygwin,
and got the same unexpected result for both.

Thanks. Paul.

Re: bart cc32n.c

<up0627$2qboq$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31741&group=comp.lang.c#31741

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mutazi...@gmail.com (Paul Edwards)
Newsgroups: comp.lang.c
Subject: Re: bart cc32n.c
Date: Fri, 26 Jan 2024 19:46:14 +0800
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <up0627$2qboq$1@dont-email.me>
References: <up00qe$2pg54$1@dont-email.me> <up03k3$2purb$1@dont-email.me>
<up05k1$2q9eq$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 26 Jan 2024 11:46:16 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ee39b9694a5b24eb3ce05777bdfd9f69";
logging-data="2961178"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+12SoNWrCVH1v4MqIBNCf0KpUZicmVgQs="
User-Agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:LddnecFD+A7dLdvWr8BIg52EnQw=
In-Reply-To: <up05k1$2q9eq$1@dont-email.me>
 by: Paul Edwards - Fri, 26 Jan 2024 11:46 UTC

On 26/01/24 19:38, Paul Edwards wrote:

> I need to do some more work before I can
> use gccwin without using anything in cygwin,
> because cc32n.c uses 64-bit values and my
> support routines exist, but don't work
> properly, so need to be debugged first.

If anyone can spot the error in this assembler
(starting with udivmodsi3 on line 100):

https://sourceforge.net/p/pdos/gitcode/ci/master/tree/pdpclib/winsupa.asm#l100

I will be able to eliminate cygwin.

Note that I didn't write this code as I
didn't know how to do it, but debugging
was left to me.

BFN. Paul.

Re: bart cc32n.c

<up06k0$2qeim$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31742&group=comp.lang.c#31742

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.1d4.us!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mutazi...@gmail.com (Paul Edwards)
Newsgroups: comp.lang.c
Subject: Re: bart cc32n.c
Date: Fri, 26 Jan 2024 19:55:41 +0800
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <up06k0$2qeim$1@dont-email.me>
References: <up00qe$2pg54$1@dont-email.me> <up03k3$2purb$1@dont-email.me>
<up05k1$2q9eq$1@dont-email.me> <up0627$2qboq$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 26 Jan 2024 11:55:44 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ee39b9694a5b24eb3ce05777bdfd9f69";
logging-data="2964054"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Xf7WtJO5XO6TmPisZTI0s4NOqUJKArlc="
User-Agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:Zc3+9Ia+t2+PBsCbp+vwwFtnnMA=
In-Reply-To: <up0627$2qboq$1@dont-email.me>
 by: Paul Edwards - Fri, 26 Jan 2024 11:55 UTC

On 26/01/24 19:46, Paul Edwards wrote:

> If anyone can spot the error in this assembler
> (starting with udivmodsi3 on line 100):
>
> https://sourceforge.net/p/pdos/gitcode/ci/master/tree/pdpclib/winsupa.asm#l100

Note that that code is in http://pdos.org/bart.zip

Assuming the executables in http://pdos.org/pdos.zip
(\dos directory in pdos.vhd) are available, then
the following sequence:

cd pdos\src
pdmake -f makek32.std
cd ..\pdpclib
pdmake -f makefile.std
cd ..\cc64
pdmake -f makefile.std

gives:

D:\devel\pdos\cc64>cc64 -c world.c
1 0
Alloc mem failure
ABORTING: Press key...
D:\devel\pdos\cc64>

I would have said "almost certainly due to those
assembler support routines", except that with
the unexpected failure of Visual Studio 2005
and cygwin, all bets are off.

BFN. Paul.

Re: bart cc32n.c

<up0dcd$2rjtu$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31745&group=comp.lang.c#31745

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (bart)
Newsgroups: comp.lang.c
Subject: Re: bart cc32n.c
Date: Fri, 26 Jan 2024 13:51:08 +0000
Organization: A noiseless patient Spider
Lines: 40
Message-ID: <up0dcd$2rjtu$1@dont-email.me>
References: <up00qe$2pg54$1@dont-email.me> <up03k3$2purb$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 26 Jan 2024 13:51:09 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="38be6987c435270cdfd924b8829a331d";
logging-data="3002302"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1++TiFoh/ECHf4RR3SdQ4yZAB9LgwkkmTk="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:p/WEuyOPMXPRgk98OZUXaMjmRTA=
In-Reply-To: <up03k3$2purb$1@dont-email.me>
Content-Language: en-GB
 by: bart - Fri, 26 Jan 2024 13:51 UTC

On 26/01/2024 11:04, bart wrote:
> On 26/01/2024 10:16, Paul Edwards wrote:

> If you like, I can spend an hour or two working with this C code trying
> to find the cause of the crashing, but when it's built with my 'tcc -m32'.
>

It turned out there wasn't much of a problem: my hello.c used __DATE__
and __TIME__, which it didn't like, so I just took those out. (If your
stuff uses them, I will need to look again.)

Otherwise most programs work using -S -E -c options.

So, I take it the main problem is the 'exceeding word32 value' error?

That is due to this code around line 31865 in cc32n.c:

if (!((((i64)-2147483648 <= value) && (value <=
(i64)((u64)4294967295u))))) {
...
ax_lib_gerror((byte*)"1:exceeding word32 value");
};

You can simply comment out this block. But I suspect that if there's a
problem with that 4294967295 value, it will manifest itself in other places.

This is also the value that your gcc complained of, but those I think
didn't have that 'u' suffix. (Maybe adding that will shut it up.)

The intention of this bit of code is to allow values in the range
i32.min to u32.max (not i32.max), to detect definitely rogue values. In
this machine-generated assembly, it should not be needed.

(I downloaded your PDOS stuff, but that had various issues, eg. gccwin
compiled, but produced no output. The a.exe that was already there,
expected a CYGWIN environment.

So there's a lot of rabbit holes there that I would rather not go down.)

Re: bart cc32n.c

<ekQsN.46271$LONb.21312@fx08.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31752&group=comp.lang.c#31752

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx08.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: bart cc32n.c
Newsgroups: comp.lang.c
References: <up00qe$2pg54$1@dont-email.me> <up02vm$2pqh4$1@dont-email.me> <up0377$2prul$1@dont-email.me> <up03s6$2purb$2@dont-email.me>
Lines: 26
Message-ID: <ekQsN.46271$LONb.21312@fx08.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Fri, 26 Jan 2024 15:36:42 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Fri, 26 Jan 2024 15:36:42 GMT
X-Received-Bytes: 1552
 by: Scott Lurndal - Fri, 26 Jan 2024 15:36 UTC

bart <bc@freeuk.com> writes:
>On 26/01/2024 10:57, Paul Edwards wrote:
>> On 26/01/24 18:53, Janis Papanagnou wrote:
>>> On 26.01.2024 11:16, Paul Edwards wrote:
>>>> Hi Bart (or anyone else interested)
>>>>
>>>> (and hopefully this doesn't start a 3 month
>>>> long thread about ... what?)
>>>
>>> Looks like a support question for a piece of proprietary code.
>>
>> It's as far from proprietary as possible - it's
>> public domain. Without the hassle of having to
>> wait for the author to die and then waiting
>> another 70 years for him to properly decompose.
>>
>>> Why don't you contact the author or issue a bug report?
>>
>> It's public domain. You're the owner as much as
>> anyone else. And if you think it's a bug, then
>> I've just given you a bug report.
>
>JP and I had an argument so he (I assume) has it in for me.
>

Perhaps, yet it is still off-topic for comp.lang.c.

Re: bart cc32n.c

<up0k9d$2u13j$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31753&group=comp.lang.c#31753

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (bart)
Newsgroups: comp.lang.c
Subject: Re: bart cc32n.c
Date: Fri, 26 Jan 2024 15:49:01 +0000
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <up0k9d$2u13j$1@dont-email.me>
References: <up00qe$2pg54$1@dont-email.me> <up02vm$2pqh4$1@dont-email.me>
<up0377$2prul$1@dont-email.me> <up03s6$2purb$2@dont-email.me>
<ekQsN.46271$LONb.21312@fx08.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 26 Jan 2024 15:49:01 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="38be6987c435270cdfd924b8829a331d";
logging-data="3081331"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+kwYO/l+M5MILjCNYMCiLyaz3CBpyqiao="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:H9pVMnJGl7pvzp7Pb4TNuD6uNFU=
In-Reply-To: <ekQsN.46271$LONb.21312@fx08.iad>
Content-Language: en-GB
 by: bart - Fri, 26 Jan 2024 15:49 UTC

On 26/01/2024 15:36, Scott Lurndal wrote:
> bart <bc@freeuk.com> writes:
>> On 26/01/2024 10:57, Paul Edwards wrote:
>>> On 26/01/24 18:53, Janis Papanagnou wrote:
>>>> On 26.01.2024 11:16, Paul Edwards wrote:
>>>>> Hi Bart (or anyone else interested)
>>>>>
>>>>> (and hopefully this doesn't start a 3 month
>>>>> long thread about ... what?)
>>>>
>>>> Looks like a support question for a piece of proprietary code.
>>>
>>> It's as far from proprietary as possible - it's
>>> public domain. Without the hassle of having to
>>> wait for the author to die and then waiting
>>> another 70 years for him to properly decompose.
>>>
>>>> Why don't you contact the author or issue a bug report?
>>>
>>> It's public domain. You're the owner as much as
>>> anyone else. And if you think it's a bug, then
>>> I've just given you a bug report.
>>
>> JP and I had an argument so he (I assume) has it in for me.
>>
>
> Perhaps, yet it is still off-topic for comp.lang.c.

It is about C and compiling C.

I understand that is not quite as on-topic as posting chunks of COBOL
and Algol68, for that I'm sorry.

Re: bart cc32n.c

<up0mt0$2ugoi$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31759&group=comp.lang.c#31759

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: bart cc32n.c
Date: Fri, 26 Jan 2024 17:33:35 +0100
Organization: A noiseless patient Spider
Lines: 50
Message-ID: <up0mt0$2ugoi$1@dont-email.me>
References: <up00qe$2pg54$1@dont-email.me> <up02vm$2pqh4$1@dont-email.me>
<up0377$2prul$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 26 Jan 2024 16:33:36 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5275502989ed94a21b07f0e0ca598467";
logging-data="3097362"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX182zXNCXj1t8+FenE6AUTzBj13eg8ksFcg="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:VlxOYU2cXCESDQpYKle7KGm7cnI=
Content-Language: en-GB
In-Reply-To: <up0377$2prul$1@dont-email.me>
 by: David Brown - Fri, 26 Jan 2024 16:33 UTC

On 26/01/2024 11:57, Paul Edwards wrote:
> On 26/01/24 18:53, Janis Papanagnou wrote:
>> On 26.01.2024 11:16, Paul Edwards wrote:
>>> Hi Bart (or anyone else interested)
>>>
>>> (and hopefully this doesn't start a 3 month
>>> long thread about ... what?)
>>
>> Looks like a support question for a piece of proprietary code.
>
> It's as far from proprietary as possible - it's
> public domain. Without the hassle of having to
> wait for the author to die and then waiting
> another 70 years for him to properly decompose.
>
>> Why don't you contact the author or issue a bug report?
>
> It's public domain. You're the owner as much as
> anyone else. And if you think it's a bug, then
> I've just given you a bug report.
>

It is public domain, but it is software written solely by Bart, and used
(AFAIK) only by you and Bart, and it's mainly of interest to you two.
It seems perfectly fair to use bcc as an example of a C compiler in
posts in c.l.c., but details of bugs or development of it do not belong
here. We do not normally discuss bugs in gcc or clang, two open source
C compilers of vastly more interest to vastly more people than bcc.
Discussions of the details of bcc are similarly off-topic.

I don't know if Bart has the project on some hosting site (github,
sourceforge, etc.), but if so, then that would be the appropriate place
for discussing issues. If not, and there is no dedicated group or
mailing list, then direct email would seem the right way to go.

Posting here would be appropriate if it is something strictly C related
- perhaps a question about the implementation of somewhat unusual code
constructs where you can't figure out the correct rules according to the
standards.

So think - if this were about gcc rather than bcc, would you post it
here? If not, then don't post it here.

And no, none of us are "owners" of the software in any sense of that
word. We did not buy it or receive it in other ways, we did not create
it, we are not responsible for it or its uses, we cannot sell it or
otherwise transfer ownership of it. Bart is the original owner - there
are no other owners.

Re: bart cc32n.c

<20240126085209.585@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31760&group=comp.lang.c#31760

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.neodome.net!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 433-929-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: bart cc32n.c
Date: Fri, 26 Jan 2024 17:13:43 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <20240126085209.585@kylheku.com>
References: <up00qe$2pg54$1@dont-email.me> <up02vm$2pqh4$1@dont-email.me>
<up0377$2prul$1@dont-email.me> <up0mt0$2ugoi$1@dont-email.me>
Injection-Date: Fri, 26 Jan 2024 17:13:43 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="96ca4eb75b4703d7855e1ee0c9e2d747";
logging-data="3110742"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+qtkqowWqmsY1zWAdqK4y2WJHcWSAAeUE="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:YCMZNEmq43y7p+5f6hxysRyFe5k=
 by: Kaz Kylheku - Fri, 26 Jan 2024 17:13 UTC

On 2024-01-26, David Brown <david.brown@hesbynett.no> wrote:
> I don't know if Bart has the project on some hosting site (github,

Bart ... git ... think about it. :)

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Re: bart cc32n.c

<up0s03$2vcoj$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31763&group=comp.lang.c#31763

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.chmurka.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (bart)
Newsgroups: comp.lang.c
Subject: Re: bart cc32n.c
Date: Fri, 26 Jan 2024 18:00:35 +0000
Organization: A noiseless patient Spider
Lines: 45
Message-ID: <up0s03$2vcoj$1@dont-email.me>
References: <up00qe$2pg54$1@dont-email.me> <up02vm$2pqh4$1@dont-email.me>
<up0377$2prul$1@dont-email.me> <up0mt0$2ugoi$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 26 Jan 2024 18:00:35 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="38be6987c435270cdfd924b8829a331d";
logging-data="3126035"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18MubH67MZQz8B7x0kFRcBn1YS7Cj+eVtU="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:2cmjHuZob30oqIhXj3q0Vy9Gj8E=
In-Reply-To: <up0mt0$2ugoi$1@dont-email.me>
Content-Language: en-GB
 by: bart - Fri, 26 Jan 2024 18:00 UTC

On 26/01/2024 16:33, David Brown wrote:
> On 26/01/2024 11:57, Paul Edwards wrote:

> Posting here would be appropriate if it is something strictly C related
> - perhaps a question about the implementation of somewhat unusual code
> constructs where you can't figure out the correct rules according to the
> standards.

This is extraordinary.

For the past month the discussion here has been about everything under
the sun, except actual C.

For me it was refresing in this thread to deal with some actual,
concrete, real-life C code, and some real bugs (here, possibly within
gcc 3.2).

But there have so far been 4 people posting in this thread who have
nothing to say on the topic on hand, other than complain about
topicality (I'm not sure what KK's post was about, it looked like an
insult).

Meanwhile, just JP has been talking about or posting examples of Ada,
Eiffel, COBOL, C++, Algol and Shell. I've struggled to see any posts
from JP with even one line of C code. Others have talked about Python or
posted makefile scripts or discussed Scandinavian heritage.

> So think - if this were about gcc rather than bcc, would you post it
> here?  If not, then don't post it here.

As noted above, it might well turn out to be a gcc bug in an old version
of it.

> And no, none of us are "owners" of the software in any sense of that
> word.  We did not buy it or receive it in other ways, we did not create
> it, we are not responsible for it or its uses, we cannot sell it or
> otherwise transfer ownership of it.  Bart is the original owner - there
> are no other owners.

This was a program of transpiled C which I put into the public domain. I
don't have copies, and Github was only used as a one-off distribution
method. The product is not supported.

Re: bart cc32n.c

<up0v3v$2vthc$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31764&group=comp.lang.c#31764

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (bart)
Newsgroups: comp.lang.c
Subject: Re: bart cc32n.c
Date: Fri, 26 Jan 2024 18:53:51 +0000
Organization: A noiseless patient Spider
Lines: 71
Message-ID: <up0v3v$2vthc$1@dont-email.me>
References: <up00qe$2pg54$1@dont-email.me> <up03k3$2purb$1@dont-email.me>
<up0dcd$2rjtu$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 26 Jan 2024 18:53:51 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="38be6987c435270cdfd924b8829a331d";
logging-data="3143212"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+7gtIJUNEub+62qHhBKrnnNED17Y9t/RU="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:9Xu/YvWVv2fItw2/zfZMUvyfo3U=
Content-Language: en-GB
In-Reply-To: <up0dcd$2rjtu$1@dont-email.me>
 by: bart - Fri, 26 Jan 2024 18:53 UTC

On 26/01/2024 13:51, bart wrote:
> On 26/01/2024 11:04, bart wrote:
>> On 26/01/2024 10:16, Paul Edwards wrote:
>
>> If you like, I can spend an hour or two working with this C code
>> trying to find the cause of the crashing, but when it's built with my
>> 'tcc -m32'.
>>
>
> It turned out there wasn't much of a problem: my hello.c used __DATE__
> and __TIME__, which it didn't like, so I just took those out. (If your
> stuff uses them, I will need to look again.)
>
> Otherwise most programs work using -S -E -c options.
>
> So, I take it the main problem is the 'exceeding word32 value' error?
>
> That is due to this code around line 31865 in cc32n.c:
>
>
>  if (!((((i64)-2147483648 <= value) && (value <=
> (i64)((u64)4294967295u))))) {
>      ...
>      ax_lib_gerror((byte*)"1:exceeding word32 value");
>  };
>

If this is an issue with gcc 3.2, it should fail this program too:

--------------------
#include <stdio.h>

typedef long long int i64;
typedef unsigned long long int u64;

int main(void) {
i64 value=0;

if (!(((i64)-2147483648 <= value) && (value <=
(i64)(u64)4294967295u))) {
printf("%lld is out of range\n", value);
}
--------------------
}

With a modern compiler this program passes with no output, which is the
intended behaviour.

However if I compile with gcc 13.2.0 using:

gcc -std=c89 c.c

then it says:

c.c:9:5: warning: this decimal constant is unsigned only in ISO C90
9 | if (!(((i64)-2147483648 <= value) && (value <=
(i64)(u64)4294967295u))) {
| ^~

Running it shows:

0 is out of range.

The compiler message is like the ones in your OP, in this case the
culprit is that first number -2147483648.

I'm not quite how to fix this, perhaps the C experts here, if they can
deign to deal with an actual C issue for a change, will have suggestions.

As I said, you can just try commenting it out, but I don't think ATM
that it's a bug in my cc32n.c program.

Re: bart cc32n.c

<up11iq$30bl4$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31767&group=comp.lang.c#31767

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!paganini.bofh.team!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: bart cc32n.c
Date: Fri, 26 Jan 2024 20:35:53 +0100
Organization: A noiseless patient Spider
Lines: 87
Message-ID: <up11iq$30bl4$1@dont-email.me>
References: <up00qe$2pg54$1@dont-email.me> <up02vm$2pqh4$1@dont-email.me>
<up0377$2prul$1@dont-email.me> <up0mt0$2ugoi$1@dont-email.me>
<up0s03$2vcoj$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 26 Jan 2024 19:35:54 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5275502989ed94a21b07f0e0ca598467";
logging-data="3157668"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Fs2g4JC7MftEc9KdzWd5TXN6xvUQR8KI="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:79N7wd9Rjq/A46wXoTkQO/imLhw=
In-Reply-To: <up0s03$2vcoj$1@dont-email.me>
Content-Language: en-GB
 by: David Brown - Fri, 26 Jan 2024 19:35 UTC

On 26/01/2024 19:00, bart wrote:
> On 26/01/2024 16:33, David Brown wrote:
>> On 26/01/2024 11:57, Paul Edwards wrote:
>
>> Posting here would be appropriate if it is something strictly C
>> related - perhaps a question about the implementation of somewhat
>> unusual code constructs where you can't figure out the correct rules
>> according to the standards.
>
> This is extraordinary.
>
> For the past month the discussion here has been about everything under
> the sun, except actual C.
>

A lot of it was off-topic, yes. But a lot of it was at least of
interest to a number of people here.

You are free to complain that people have been talking too much about
COBOL, C++, or whatever - and that would be a valid complaint, and
something that people in the group should respect.

Two wrongs, however, do not make a right.

> For me it was refresing in this thread to deal with some actual,
> concrete, real-life C code, and some real bugs (here, possibly within
> gcc 3.2).

But this thread is not talking about real-life C code. It is talking
about a real-life C /compiler/. That is different.

If the OP was posting some C code and asking "what's wrong with this?",
so that we could look at the C code and help find problems with the C,
it would be on-topic. But he is posting error messages from a
compilation - he is having trouble with /tools/, not /C/.

Can you see that this is different?

>
> But there have so far been 4 people posting in this thread who have
> nothing to say on the topic on hand, other than complain about
> topicality (I'm not sure what KK's post was about, it looked like an
> insult).

I /did/ have something to say. I gave the OP suggestions about better
ways to get help with his problem that is not really c.l.c material. If
your project is on github, sourceforge, or any similar platform, then
discussing the issue there may help more people, and may also help grow
a community around it since potential users will see it as active. It
helps everyone.

It is not that I don't want the OP to get things working - it is simply
that this is not the best place for such help.

>
>> So think - if this were about gcc rather than bcc, would you post it
>> here?  If not, then don't post it here.
>
> As noted above, it might well turn out to be a gcc bug in an old version
> of it.
>

And posting about that would be off-topic too. If it was a particularly
interesting bug, or particularly dangerous, or a bug that had lasted
from gcc 3.2 to current versions (which could make it interesting /and/
dangerous), then it might be of interest to many people here and
therefore worth posting even if it is technically off-topic.

But there are nearly a hundred thousand bugs or issues registered for
gcc (including duplicates, non-bugs, etc. - everything in the gcc
bugzilla database). Posting about all these here would be absurd.

>> And no, none of us are "owners" of the software in any sense of that
>> word.  We did not buy it or receive it in other ways, we did not
>> create it, we are not responsible for it or its uses, we cannot sell
>> it or otherwise transfer ownership of it.  Bart is the original owner
>> - there are no other owners.
>
> This was a program of transpiled C which I put into the public domain. I
> don't have copies, and Github was only used as a one-off distribution
> method. The product is not supported.
>

None of that makes it likely that c.l.c. is a good place to talk about
the compilation issues the OP is having.

Re: bart cc32n.c

<up15f8$30vld$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31770&group=comp.lang.c#31770

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.chmurka.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.lang.c
Subject: Re: bart cc32n.c
Date: Fri, 26 Jan 2024 21:42:16 +0100
Organization: A noiseless patient Spider
Lines: 55
Message-ID: <up15f8$30vld$1@dont-email.me>
References: <up00qe$2pg54$1@dont-email.me> <up02vm$2pqh4$1@dont-email.me>
<up0377$2prul$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 26 Jan 2024 20:42:16 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="34d0e4a1519ed875e1dea122a8a9c63a";
logging-data="3178157"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/L+hYtYAg2kf0arMYm+DLi"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:bTRWtLZfr9yPQ8KVxpULECBo4Jc=
In-Reply-To: <up0377$2prul$1@dont-email.me>
X-Enigmail-Draft-Status: N1110
 by: Janis Papanagnou - Fri, 26 Jan 2024 20:42 UTC

On 26.01.2024 11:57, Paul Edwards wrote:
> On 26/01/24 18:53, Janis Papanagnou wrote:
>> On 26.01.2024 11:16, Paul Edwards wrote:
>>> Hi Bart (or anyone else interested)
>>>
>>> (and hopefully this doesn't start a 3 month
>>> long thread about ... what?)
>>
>> Looks like a support question for a piece of proprietary code.
>
> It's as far from proprietary as possible - it's
> public domain. [...]

You are right, the choice of that word was not appropriate.

>
>> Why don't you contact the author or issue a bug report?
>
> It's public domain. You're the owner as much as
> anyone else. And if you think it's a bug, then
> I've just given you a bug report.

No, you are wrong, I'm not the owner of this piece of... code.

If someone makes a big heap of fecal in a public park, would
you think I'm the owner? I'd rather sue the one who did that;
because the park (or Usenet) is common property, and the heap
of fecal (or that code) is not.

It's interesting that there's again so many posts in this thread.
A thread about some ominous "cc32n" tool, that is running in some
mythical D:\ universe. - Or is that >>> D:\ <<< just a smiley?

Mind, I had just observed:
"Looks like a support question for a piece of proprietary code."
and suggested:
"Why don't you contact the author or issue a bug report?"

The thread is even under subject "bart" and that person is also
personally addressed in the salutation. - Clear indications that
a personal email would be much better. - Paul, why aren't you
contacting the tool author if you have issues with his tool?

Googlies may not know that; Usenet is not a "public mailbox".

Especially since you also express your hope:
"and hopefully this doesn't start a 3 month long thread"
It was on you to not initiate this spam, and it's still on you
to redirect it to a more appropriate place.

Good luck.

Janis

Re: bart cc32n.c

<878r4b3jqq.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31771&group=comp.lang.c#31771

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.chmurka.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: bart cc32n.c
Date: Fri, 26 Jan 2024 12:47:09 -0800
Organization: None to speak of
Lines: 71
Message-ID: <878r4b3jqq.fsf@nosuchdomain.example.com>
References: <up00qe$2pg54$1@dont-email.me> <up03k3$2purb$1@dont-email.me>
<up0dcd$2rjtu$1@dont-email.me> <up0v3v$2vthc$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="8f39831f746400b49513f5e46ff4c868";
logging-data="3179549"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18fXulsBajlpdG/T0n+Ic+V"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:UZS9d7MPxnzia69yCl4T2Md16to=
sha1:TFNQqI8F29ifkQvubLaX8bUsY/c=
 by: Keith Thompson - Fri, 26 Jan 2024 20:47 UTC

bart <bc@freeuk.com> writes:
[...]
> If this is an issue with gcc 3.2, it should fail this program too:
>
> --------------------
> #include <stdio.h>
>
> typedef long long int i64;
> typedef unsigned long long int u64;
>
> int main(void) {
> i64 value=0;
>
> if (!(((i64)-2147483648 <= value) && (value <=
> (i64)(u64)4294967295u))) {
> printf("%lld is out of range\n", value);
> }
> --------------------
> }
>
> With a modern compiler this program passes with no output, which is
> the intended behaviour.
>
> However if I compile with gcc 13.2.0 using:
>
> gcc -std=c89 c.c
>
> then it says:
>
> c.c:9:5: warning: this decimal constant is unsigned only in ISO C90
> 9 | if (!(((i64)-2147483648 <= value) && (value <=
> (i64)(u64)4294967295u))) {
> | ^~

I get that same warning, but only if I specify "-m32". long int is 64
bits by default on my system; "-m32" makes it 32 bits, which triggers
the warning.

And if I compile with "gcc -m32 -std=c89 -pedantic", I get warnings
about "long long" and the "ll" length modifier. gcc in C89 mode
supports both as an extension, but is required to warn about "long long"
in conforming mode. ("gcc -std=c89" does not issue all C89-required
diagnostics.)

The rules for integer constants changed between C89/C90 and C99, when
"long long" was added.

In C89/C90, the type of an unsuffixed decimal integer constant is the
first of int, long int, or unsigned long int, in which its value fits.
In C99 and later, the list is int, long int, long long int; unsuffixed
decimal constants are never of any unsigned type.

So in C89/C90 on a system where long int is 32 bits, 2147483648 is of
type unsigned long int. Negating that value yields 2147483648.
In C99 and later, 2147483648 is of type long long int, and negating it
yields -2147483648.

Remember that -2147483648 is not an integer constant. It's an
expression consisting of a unary "-" operator applied to the constant
2147483648. The negation operator is the one for the type of the
constant, regardless of the context in which the expression appears.

In C90 with 32-bit long int, there is no signed type that can hold the
value 2147483648 .

[...]

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Medtronic
void Void(void) { Void(); } /* The recursive call of the void */

Re: bart cc32n.c

<up167q$31002$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31772&group=comp.lang.c#31772

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!paganini.bofh.team!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jmc...@neutron.jmcunx.com (John McCue)
Newsgroups: comp.lang.c
Subject: Re: bart cc32n.c
Date: Fri, 26 Jan 2024 20:55:22 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <up167q$31002$1@dont-email.me>
References: <up00qe$2pg54$1@dont-email.me> <up02vm$2pqh4$1@dont-email.me> <up0377$2prul$1@dont-email.me> <up0mt0$2ugoi$1@dont-email.me> <up0s03$2vcoj$1@dont-email.me>
Reply-To: jmclnx@SPAMisBADgmail.com
Injection-Date: Fri, 26 Jan 2024 20:55:22 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5e55267fcd5d59773239b75465a431f2";
logging-data="3178498"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19EfQMiODGHAEII/Zrmb0tH"
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (NetBSD/10.0_RC3 (amd64))
Cancel-Lock: sha1:31YmGyWwzlfjiVwRlihCFNwMdp0=
X-OS-Version: NetBSD 10-RC3 amd64
 by: John McCue - Fri, 26 Jan 2024 20:55 UTC

bart <bc@freeuk.com> wrote:
<snip>

> For the past month the discussion here has been about everything under
> the sun, except actual C.
>
> For me it was refresing in this thread to deal with some actual,
> concrete, real-life C code, and some real bugs (here, possibly within
> gcc 3.2).

I for one is fine with this thread since seems to have to do
with a c program used in an obscure OS or emulation package.

It is easy enough to kill it if you do not like it. We all
have had plenty of practice with filtering in the past few
months :)

--
[t]csh(1) - "An elegant shell, for a more... civilized age."
- Paraphrasing Star Wars

Re: bart cc32n.c

<up1go9$32m99$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31785&group=comp.lang.c#31785

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mutazi...@gmail.com (Paul Edwards)
Newsgroups: comp.lang.c
Subject: Re: bart cc32n.c
Date: Sat, 27 Jan 2024 07:54:47 +0800
Organization: A noiseless patient Spider
Lines: 305
Message-ID: <up1go9$32m99$1@dont-email.me>
References: <up00qe$2pg54$1@dont-email.me> <up03k3$2purb$1@dont-email.me>
<up0dcd$2rjtu$1@dont-email.me> <up0v3v$2vthc$1@dont-email.me>
<878r4b3jqq.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 26 Jan 2024 23:54:49 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5cf26165dacfc58e37a3c00d01dd61a0";
logging-data="3234089"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19muaLcNIrqvs++LTIQFfFHX7DoCrUR7B8="
User-Agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:JKTWJS4kxml7FN6dVCHGpu7mgic=
In-Reply-To: <878r4b3jqq.fsf@nosuchdomain.example.com>
 by: Paul Edwards - Fri, 26 Jan 2024 23:54 UTC

On 27/01/24 04:47, Keith Thompson wrote:
> bart <bc@freeuk.com> writes:
> [...]
>> If this is an issue with gcc 3.2, it should fail this program too:
>>
>> --------------------
>> #include <stdio.h>
>>
>> typedef long long int i64;
>> typedef unsigned long long int u64;
>>
>> int main(void) {
>> i64 value=0;
>>
>> if (!(((i64)-2147483648 <= value) && (value <=
>> (i64)(u64)4294967295u))) {
>> printf("%lld is out of range\n", value);
>> }
>> --------------------
>> }
>>
>> With a modern compiler this program passes with no output, which is
>> the intended behaviour.
>>
>> However if I compile with gcc 13.2.0 using:
>>
>> gcc -std=c89 c.c
>>
>> then it says:
>>
>> c.c:9:5: warning: this decimal constant is unsigned only in ISO C90
>> 9 | if (!(((i64)-2147483648 <= value) && (value <=
>> (i64)(u64)4294967295u))) {
>> | ^~
>
> I get that same warning, but only if I specify "-m32". long int is 64
> bits by default on my system; "-m32" makes it 32 bits, which triggers
> the warning.
>
> And if I compile with "gcc -m32 -std=c89 -pedantic", I get warnings
> about "long long" and the "ll" length modifier. gcc in C89 mode
> supports both as an extension, but is required to warn about "long long"
> in conforming mode. ("gcc -std=c89" does not issue all C89-required
> diagnostics.)
>
> The rules for integer constants changed between C89/C90 and C99, when
> "long long" was added.
>
> In C89/C90, the type of an unsuffixed decimal integer constant is the
> first of int, long int, or unsigned long int, in which its value fits.
> In C99 and later, the list is int, long int, long long int; unsuffixed
> decimal constants are never of any unsigned type.
>
> So in C89/C90 on a system where long int is 32 bits, 2147483648 is of
> type unsigned long int. Negating that value yields 2147483648.
> In C99 and later, 2147483648 is of type long long int, and negating it
> yields -2147483648.
>
> Remember that -2147483648 is not an integer constant. It's an
> expression consisting of a unary "-" operator applied to the constant
> 2147483648. The negation operator is the one for the type of the
> constant, regardless of the context in which the expression appears.
>
> In C90 with 32-bit long int, there is no signed type that can hold the
> value 2147483648 .

Thankyou. That was difficult to comprehend,
but the "never unsigned type" was the phrase
that triggered me to make this change:

https://sourceforge.net/p/pdos/gitcode/ci/bb6e46a06241965f1d755563c998be196e217eca/

to eliminate the warnings, and then it worked great!

During the debugging process I also confirmed
that this code:

# Note that the push and pop of ecx appears to
# be unnecessary but harmless. It was originally
# missing, but adding it didn't help

udivmodsi3:

push ebp
mov ebp, esp

push edi
push esi
push ebx
push ecx

sub esp, 36

mov ecx, dword ptr [ebp + 8]
mov dword ptr [ebp - 40], ecx

mov ecx, dword ptr [ebp + 12]
mov dword ptr [ebp - 36], ecx

mov ecx, dword ptr [ebp + 16]
mov dword ptr [ebp - 48], ecx

mov ecx, dword ptr [ebp + 20]
mov dword ptr [ebp - 44], ecx

mov dword ptr [ebp - 24], 1
mov dword ptr [ebp - 20], 0

jmp L2

L4:

mov ecx, dword ptr [ebp - 48]
mov ebx, dword ptr [ebp - 44]

shld ebx, ecx, 1
add ecx, ecx

mov dword ptr [ebp - 48], ecx
mov dword ptr [ebp - 44], ebx

sal dword ptr [ebp - 24], 1

L2:

mov ecx, dword ptr [ebp - 48]
mov ebx, dword ptr [ebp - 44]

cmp ecx, dword ptr [ebp - 40]
sbb ebx, dword ptr [ebp - 36]
jnc L5

cmp dword ptr [ebp - 24], 0
jnb L5

mov ecx, dword ptr [ebp - 48]
and ecx, -2147483648

mov eax, ecx
mov ecx, dword ptr [ebp - 44]
and ch, -1

mov edi, ecx
mov ebx, eax
xor bh, 0

mov edi, ebx
mov ebx, edx
xor bh, 0

mov edi, ebx
mov ecx, edi
or ecx, esi

test ecx, ecx
jna L4

jmp L5

L7:

mov eax, dword ptr [ebp - 40]
mov edx, dword ptr [ebp - 36]

cmp eax, dword ptr [ebp - 48]
mov eax, edx
sbb eax, dword ptr [ebp - 44]
jc L6

mov eax, dword ptr [ebp - 48]
mov edx, dword ptr [ebp - 44]

sub dword ptr [ebp - 40], eax
sbb dword ptr [ebp - 36], edx

mov eax, dword ptr [ebp - 24]
or dword ptr [ebp - 20], eax

L6:

shr dword ptr [ebp - 24], 1

mov eax, dword ptr [ebp - 48]
mov edx, dword ptr [ebp - 44]

shrd eax, edx, 1
shr edx, 1

mov dword ptr [ebp - 48], eax
mov dword ptr [ebp - 44], edx

L5:

cmp dword ptr [ebp - 24], 0
jne L7

; did they ask for the divided amount (0)
; or the remainder (1)?

cmp dword ptr [ebp + 24], 0
je L8

; return remainder
mov eax, dword ptr [ebp - 40]
mov edx, dword ptr [ebp - 36]

jmp L9

; return divided amount
L8:

mov eax, dword ptr [ebp - 20]
xor edx, edx

L9:

add esp, 36
pop ecx
pop ebx
pop esi
pop edi
pop ebp
ret

__umoddi3:

push ebp
mov ebp, esp

push 1
push dword ptr [ebp + 20]
push dword ptr [ebp + 16]
push dword ptr [ebp + 12]
push dword ptr [ebp + 8]

call udivmodsi3
add esp, 20

pop ebp
ret

__udivdi3:

push ebp
mov ebp, esp

push 0
push dword ptr [ebp + 20]
push dword ptr [ebp + 16]
push dword ptr [ebp + 12]
push dword ptr [ebp + 8]

call udivmodsi3
add esp, 20

pop ebp
ret

__moddi3:

push ebp
mov ebp, esp

push 1
push dword ptr [ebp + 20]
push dword ptr [ebp + 16]
push dword ptr [ebp + 12]
push dword ptr [ebp + 8]

call udivmodsi3
add esp, 20

pop ebp
ret

; bottom of stack has original number as 32:32, e.g. 50
; top of stack has number to divide by as 32:32, e.g. 10
; result, e.g. 5, should be in edx:eax
__divdi3:

push ebp
mov ebp, esp

push 0
push dword ptr [ebp + 20]
push dword ptr [ebp + 16]
push dword ptr [ebp + 12]
push dword ptr [ebp + 8]

call udivmodsi3
add esp, 20

pop ebp
ret

is return 1 for a divdi3 (seems always 1)
instead of a proper value. So that issue
is still preventing me from moving from
cygwin gcc 3.2 to my own gcc 3.2.3.

BFN. Paul.

Re: bart cc32n.c

<up306o$3d279$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31808&group=comp.lang.c#31808

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.niel.me!news.gegeweb.eu!gegeweb.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mutazi...@gmail.com (Paul Edwards)
Newsgroups: comp.lang.c
Subject: Re: bart cc32n.c
Date: Sat, 27 Jan 2024 21:24:35 +0800
Organization: A noiseless patient Spider
Lines: 125
Message-ID: <up306o$3d279$1@dont-email.me>
References: <up00qe$2pg54$1@dont-email.me> <up02vm$2pqh4$1@dont-email.me>
<up0377$2prul$1@dont-email.me> <up0mt0$2ugoi$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 27 Jan 2024 13:24:40 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5cf26165dacfc58e37a3c00d01dd61a0";
logging-data="3573993"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/+m8i0Es97ANofiOLY1rMMQLnJPkY2QAg="
User-Agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:QPZH53zNABJwZVDfJKkxRW/nvbA=
In-Reply-To: <up0mt0$2ugoi$1@dont-email.me>
 by: Paul Edwards - Sat, 27 Jan 2024 13:24 UTC

On 27/01/24 00:33, David Brown wrote:
> On 26/01/2024 11:57, Paul Edwards wrote:

>> It's public domain. You're the owner as much as
>> anyone else. And if you think it's a bug, then
>> I've just given you a bug report.
>>
>
> It is public domain, but it is software written solely by Bart, and used

Doesn't make any difference who wrote it.

> (AFAIK) only by you and Bart,

It's not used by Bart at all that I am aware of.

> and it's mainly of interest to you two.

No. It's of interest to me and some other people,
not Bart.

> It
> seems perfectly fair to use bcc as an example of a C compiler in posts

This isn't bcc.

> in c.l.c., but details of bugs or development of it do not belong here.
> We do not normally discuss bugs in gcc or clang, two open source C
> compilers of vastly more interest to vastly more people than bcc.
> Discussions of the details of bcc are similarly off-topic.
>
> I don't know if Bart has the project on some hosting site (github,
> sourceforge, etc.),

It is me who has the compiler on sourceforge.

> but if so, then that would be the appropriate place
> for discussing issues. If not, and there is no dedicated group or
> mailing list, then direct email would seem the right way to go.

Bart does not own it, and has explicitly said he
has no interest in it, and doesn't support it.

So I'm on my own, and I don't have the skills to
know what to do. It was in fact Keith who had the
skills, but I didn't know that in advance. And
Bart was kind enough to get it to the point where
Keith was able to identify the issue.

> Posting here would be appropriate if it is something strictly C related
> - perhaps a question about the implementation of somewhat unusual code
> constructs where you can't figure out the correct rules according to the
> standards.
>
> So think - if this were about gcc rather than bcc, would you post it
> here? If not, then don't post it here.

I exactly posted a gcc issue a week ago, so, yes.

There's nowhere else for me to go.

The GNU people have no interest in supporting
gcc 3.2.3, in fact, they were "keen to delete"
the precious (to me) i370 target, displaying
the massive contempt for one of the most
important machines in the world.

> And no, none of us are "owners" of the software in any sense of that
> word.

Yes you are. As much as anyone else in the world is.
That's the exact definition of public domain.

If you were an alien from Alpha Centauri you could
perhaps argue that you're not a member of the public.

> We did not buy it or receive it in other ways,

Nobody bought it. We're all in the same boat.
And it was exactly received by a post to this
exact newsgroup. If you didn't bother to
download it when it was posted, so be it.

> we did not create it,

It's unclear if even Bart created it. It is
generated code.

> we are not responsible for it or its uses,

Nobody is responsible, or everyone is equally
responsible, whichever way you look at it.

> we cannot sell it

Yes you can.

> or otherwise transfer ownership of it.

Nobody can. It's in the public domain. Again,
we're all in the same boat.

> Bart is the original owner

He was indeed the original owner. But not any
more. You are the equal of Bart.

In fact, if there is anyone who is top dog,
it's me. I maintain the source code and
build it and distribute it, and take an
interest in bugs. Bart doesn't do any of
those things, but he does graciously assist.

> - there are no other owners.

There are no owners full stop. Unless the
public is considered an owner, which it is.

Public domain code is not "unowned" waiting
for the first person do notice it to declare
ownership of. It is owned by the public.

BFN. Paul.

Re: bart cc32n.c

<up30tc$3d5mk$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31809&group=comp.lang.c#31809

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mutazi...@gmail.com (Paul Edwards)
Newsgroups: comp.lang.c
Subject: Re: bart cc32n.c
Date: Sat, 27 Jan 2024 21:36:32 +0800
Organization: A noiseless patient Spider
Lines: 87
Message-ID: <up30tc$3d5mk$1@dont-email.me>
References: <up00qe$2pg54$1@dont-email.me> <up02vm$2pqh4$1@dont-email.me>
<up0377$2prul$1@dont-email.me> <up15f8$30vld$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 27 Jan 2024 13:36:44 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5cf26165dacfc58e37a3c00d01dd61a0";
logging-data="3577556"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+UgrZKMWClx5S8PIW5hMXnlk7H9luIxP8="
User-Agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:fLFFFVt5b8TPwFFAFY1vqdW+iEw=
In-Reply-To: <up15f8$30vld$1@dont-email.me>
 by: Paul Edwards - Sat, 27 Jan 2024 13:36 UTC

On 27/01/24 04:42, Janis Papanagnou wrote:
> On 26.01.2024 11:57, Paul Edwards wrote:

>>> Why don't you contact the author or issue a bug report?
>>
>> It's public domain. You're the owner as much as
>> anyone else. And if you think it's a bug, then
>> I've just given you a bug report.
>
> No, you are wrong, I'm not the owner of this piece of... code.

Yes you are. The reason above stands.

> If someone makes a big heap of fecal in a public park, would
> you think I'm the owner? I'd rather sue the one who did that;

If Bart had deliberately inserted a virus into
cc32n.c, yes, he could be sued. This is not the
case. A better analogy is Shakespeare's "Hamlet".
Even if Hamlet had put a computer virus into the
text somehow - he can't be sued. He's been dead
for more than 70 years.

> because the park (or Usenet) is common property, and the heap
> of fecal (or that code) is not.

That code is exactly common property, just as
"Hamlet" is.

> It's interesting that there's again so many posts in this thread.
> A thread about some ominous "cc32n" tool, that is running in some
> mythical D:\ universe. - Or is that >>> D:\ <<< just a smiley?
>
> Mind, I had just observed:
> "Looks like a support question for a piece of proprietary code."
> and suggested:
> "Why don't you contact the author or issue a bug report?"
>
> The thread is even under subject "bart" and that person is also
> personally addressed in the salutation.

That's true. Although Bart transferred ownership
(to the public) and said he wanted nothing to do
with it anymore (but I have a use for it - so I
attempt to support it myself), I was hoping that
"for old times' sake" he would venture an opinion
anyway. And that's exactly what happened.

And it wasn't just to bart. The salutation clearly
says "anyone else".

> - Clear indications that
> a personal email would be much better.

That would be a last resort.

That would be targeting someone who clearly
stated they didn't want to be targeted.

> - Paul, why aren't you
> contacting the tool author if you have issues with his tool?

Because the tool author is no longer the owner
and does not support it.

> Googlies may not know that; Usenet is not a "public mailbox".

It's a place that you can get support.

And that's exactly what I got. Not for the
first time.

> Especially since you also express your hope:
> "and hopefully this doesn't start a 3 month long thread"
> It was on you to not initiate this spam, and it's still on you
> to redirect it to a more appropriate place.

That was a joke.

I don't care if you carry this thread off on a
tangent for the next 50 years.

I'm unlikely to read the tangent myself - well,
actually - I did read some with incredulity.

BFN. Paul.

Re: bart cc32n.c

<up3evn$3fhg6$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31820&group=comp.lang.c#31820

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.niel.me!news.gegeweb.eu!gegeweb.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: bart cc32n.c
Date: Sat, 27 Jan 2024 18:36:54 +0100
Organization: A noiseless patient Spider
Lines: 184
Message-ID: <up3evn$3fhg6$1@dont-email.me>
References: <up00qe$2pg54$1@dont-email.me> <up02vm$2pqh4$1@dont-email.me>
<up0377$2prul$1@dont-email.me> <up0mt0$2ugoi$1@dont-email.me>
<up306o$3d279$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 27 Jan 2024 17:36:55 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2eeb3bda41f88f1d87610b9eee2a7cea";
logging-data="3655174"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/AUhHzK3+8H5LhJnz3lBWfZ0ryht+qKgc="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:Jce0D5H1qL5OcSlU6to+aLUI8IE=
In-Reply-To: <up306o$3d279$1@dont-email.me>
Content-Language: en-GB
 by: David Brown - Sat, 27 Jan 2024 17:36 UTC

On 27/01/2024 14:24, Paul Edwards wrote:
> On 27/01/24 00:33, David Brown wrote:
>> On 26/01/2024 11:57, Paul Edwards wrote:
>
>>> It's public domain. You're the owner as much as
>>> anyone else. And if you think it's a bug, then
>>> I've just given you a bug report.
>>>
>>
>> It is public domain, but it is software written solely by Bart, and used
>
> Doesn't make any difference who wrote it.
>

It makes a very big difference in regard to who can help you with it,
and who might be interested in its details.

>> (AFAIK) only by you and Bart,
>
> It's not used by Bart at all that I am aware of.
>

That just makes it even less appropriate to post it here.

>> and it's mainly of interest to you two.
>
> No. It's of interest to me and some other people,
> not Bart.
>

Who else? And is this the appropriate place to talk to them about your
issues?

If you were announcing the availability of a new C compiler, that could
be of interest to the group even if no one wanted to use it. But you
are talking about some details of problems you are having compiling it -
that's a different matter. Just because it is a C compiler, does not
make it on-topic for the group. Someone having trouble compiling
"sqllite" (to pick a random example) would not post here even though the
program was written in C and released in the public domain. They would
post in a place where they would find users people that might be able to
help them, and where it is on topic - such as a a mailing list or
project issue handler for sqllite.

>
> There's nowhere else for me to go.

If you can get this down to a C question, this would be a perfectly good
place to come. If you are having trouble building software, posting a
heap of meaningless build errors is not helpful.

People can help here with C questions. We can't, generally, help with
build issues with random bits of software. Keith didn't answer your
question - he helped with /Bart/'s question. Bart posted some C code,
which Keith was able to comment on.

>
> The GNU people have no interest in supporting
> gcc 3.2.3, in fact, they were "keen to delete"
> the precious (to me) i370 target, displaying
> the massive contempt for one of the most
> important machines in the world.

Of course the GNU folks have no interest in supporting gcc 3.2.3 - it's
ancient history. The i370 may have been an important machine in its
time, now it is a museum article. There's nothing wrong with history or
museums - I'm a great history fan myself. But there is something very
wrong with obsessing with it or trying to keep it "alive" like this.
It's great to learn about Roman soldiers, to see their weapons and
armour in museums, and to have re-enactments of old battles. But it is
pointless to try to use new materials or methods to make better Roman
armour - that would be showing contempt for the history.

So I understand that you are interested in the history of old computers.
I don't understand that you think other people should have any kind of
duty or obligation to do so too. And if anyone involved in gcc
development were really keen on the i370, they'd want to make it work
for /modern/ gcc, not such an old version.

People can't support things forever - if they try to do so, no one would
ever have time to work in the modern world. Let the past be the past -
be interested in it, learn from it, teach it, but do not forget that it
is the past.

(There are no doubt still some i370 machines running. And no one using
them will ever be interested in using your personal port of an ancient
version of gcc. They will run the software they have always run on
them, because that's why they are still running those machines.)

>
>> And no, none of us are "owners" of the software in any sense of that
>> word.
>
> Yes you are. As much as anyone else in the world is.
> That's the exact definition of public domain.

No, it is not. For someone who is so obsessed with "public domain", you
are remarkably ignorant about it. /No one/ owns the software released
into the public domain, at least in countries that recognise such the
concept of relinquishing ownership. (Not all countries accept that as a
legal concept.)

>
>> we are not responsible for it or its uses,
>
> Nobody is responsible, or everyone is equally
> responsible, whichever way you look at it.
>

These are hugely different ways of looking at it. If I were to say "I
think some people in your family are murderers", would you respond with
"No one in my family is a murderer", or "Everyone in my family is
equally murderous" ?

No one owns the software - it is not the case that we all own it. No
one is responsible for it (except perhaps in some countries, or in
certain aspects). It is not that case that everyone is responsible for it.

>> we cannot sell it
>
> Yes you can.

No you can't. You can sell copies of it, but you can't sell the
software itself in any real sense. Selling the software itself would
imply transferring ownership or rights.

>
>> or otherwise transfer ownership of it.
>
> Nobody can. It's in the public domain. Again,
> we're all in the same boat.

The point is, no one is in any boat.

>
>> Bart is the original owner
>
> He was indeed the original owner. But not any
> more.

Correct.

> You are the equal of Bart.

That is true only in the same meaningless sense that Bart and I have
equal numbers of wings sprouting from our shoulders.

>
> In fact, if there is anyone who is top dog,
> it's me. I maintain the source code and
> build it and distribute it, and take an
> interest in bugs. Bart doesn't do any of
> those things, but he does graciously assist.
>

You are free to do that, and to take responsibility of the software -
that's a choice you can make.

>> - there are no other owners.
>
> There are no owners full stop.

So stop there.

> Unless the
> public is considered an owner, which it is.

It is not. That's the point. "The public" does not exist as a legal
entity, and cannot own anything.

>
> Public domain code is not "unowned" waiting
> for the first person do notice it to declare
> ownership of. It is owned by the public.
>

It is not owned by the public, because that concept has no meaning. But
you are correct that no one can declare ownership of it. Note that
"public domain" refers only to things for which copyright law may apply,
and that necessarily means things that can be copied. Public domain
means no one owns the copyrights or other exclusive intellectual rights
to the software.

Re: bart cc32n.c

<up3g8r$3fn7i$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31822&group=comp.lang.c#31822

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (bart)
Newsgroups: comp.lang.c
Subject: Re: bart cc32n.c
Date: Sat, 27 Jan 2024 17:58:51 +0000
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <up3g8r$3fn7i$1@dont-email.me>
References: <up00qe$2pg54$1@dont-email.me> <up02vm$2pqh4$1@dont-email.me>
<up0377$2prul$1@dont-email.me> <up0mt0$2ugoi$1@dont-email.me>
<up306o$3d279$1@dont-email.me> <up3evn$3fhg6$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 27 Jan 2024 17:58:51 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="57a0e44d94d7e92b3900d2671e8a2518";
logging-data="3661042"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19NFRXXUYb6cbDcsPpsHhW55Pv3uWr3SZ4="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:VyObBpHCZAl/HVzOGueJwS6XaZ4=
In-Reply-To: <up3evn$3fhg6$1@dont-email.me>
Content-Language: en-GB
 by: bart - Sat, 27 Jan 2024 17:58 UTC

On 27/01/2024 17:36, David Brown wrote:
> On 27/01/2024 14:24, Paul Edwards wrote:

> If you can get this down to a C question, this would be a perfectly good
> place to come.  If you are having trouble building software, posting a
> heap of meaningless build errors is not helpful.

But in the end it did come down to a C question.

I'm curious however as to what you think this newsgroup is for.

The C group on Reddit, which is moderated, is far more diverse in what
is allowed. Nobody seems that bothered about it.

It might be about tools to build and work with the language. Building
problems encountered in some project. Requests for code reviews. Even
careers advice; all sorts of stuff.

I would have found this thread interesting even if I'd had nothing to do
with it, because I like problem-solving and bug-hunting.

> People can help here with C questions.  We can't, generally, help with
> build issues with random bits of software.

Why not? I'm sure there are lurkers with the practical experience to
help out, but are put off thinking only theoretical and hypothetical
matters discussed.

Pages:123
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor