Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #144055 > unrolled thread
| Started by | mertesthomas@gmail.com |
|---|---|
| First post | 2019-05-28 02:32 -0700 |
| Last post | 2019-06-10 03:42 -0500 |
| Articles | 13 on this page of 33 — 8 participants |
Back to article view | Back to comp.lang.c
Where can I find Barts C compiler (bcc) mertesthomas@gmail.com - 2019-05-28 02:32 -0700
Re: Where can I find Barts C compiler (bcc) Bart <bc@freeuk.com> - 2019-05-28 11:33 +0100
Re: Where can I find Barts C compiler (bcc) mertesthomas@gmail.com - 2019-05-31 00:18 -0700
Re: Where can I find Barts C compiler (bcc) Bart <bc@freeuk.com> - 2019-05-31 14:14 +0100
Re: Where can I find Barts C compiler (bcc) Bart <bc@freeuk.com> - 2019-06-01 19:11 +0100
Re: Where can I find Barts C compiler (bcc) mertesthomas@gmail.com - 2019-06-02 04:16 -0700
Re: Where can I find Barts C compiler (bcc) Bart <bc@freeuk.com> - 2019-06-02 15:31 +0100
Re: Where can I find Barts C compiler (bcc) mertesthomas@gmail.com - 2019-06-02 07:56 -0700
Re: Where can I find Barts C compiler (bcc) Bart <bc@freeuk.com> - 2019-06-02 16:11 +0100
Re: Where can I find Barts C compiler (bcc) mertesthomas@gmail.com - 2019-06-02 10:43 -0700
Re: Where can I find Barts C compiler (bcc) Bart <bc@freeuk.com> - 2019-06-02 19:20 +0100
Re: Where can I find Barts C compiler (bcc) mertesthomas@gmail.com - 2019-06-03 14:36 -0700
Re: Where can I find Barts C compiler (bcc) Bart <bc@freeuk.com> - 2019-06-03 23:47 +0100
Re: Where can I find Barts C compiler (bcc) Bart <bc@freeuk.com> - 2019-06-04 01:46 +0100
Re: Where can I find Barts C compiler (bcc) Bart <bc@freeuk.com> - 2019-06-04 15:55 +0100
Re: Where can I find Barts C compiler (bcc) Bart <bc@freeuk.com> - 2019-06-04 19:14 +0100
Re: Where can I find Barts C compiler (bcc) mertesthomas@gmail.com - 2019-06-04 12:25 -0700
Re: Where can I find Barts C compiler (bcc) bart4858@gmail.com - 2019-06-04 13:14 -0700
Re: Where can I find Barts C compiler (bcc) mertesthomas@gmail.com - 2019-06-05 14:29 -0700
Re: Where can I find Barts C compiler (bcc) Bart <bc@freeuk.com> - 2019-06-05 23:46 +0100
Re: Where can I find Barts C compiler (bcc) Bart <bc@freeuk.com> - 2019-06-06 02:19 +0100
Re: Where can I find Barts C compiler (bcc) mertesthomas@gmail.com - 2019-06-06 14:39 -0700
Re: Where can I find Barts C compiler (bcc) Bart <bc@freeuk.com> - 2019-06-06 23:54 +0100
Re: Where can I find Barts C compiler (bcc) mertesthomas@gmail.com - 2019-06-09 07:05 -0700
Re: Where can I find Barts C compiler (bcc) Bart <bc@freeuk.com> - 2019-06-09 16:12 +0100
Re: Where can I find Barts C compiler (bcc) mertesthomas@gmail.com - 2019-06-09 10:14 -0700
Re: Where can I find Barts C compiler (bcc) Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-06-09 20:07 +0100
Re: Where can I find Barts C compiler (bcc) gazelle@shell.xmission.com (Kenny McCormack) - 2019-06-09 21:57 +0000
Re: Where can I find Barts C compiler (bcc) fir <profesor.fir@gmail.com> - 2019-06-09 17:16 -0700
Re: Where can I find Barts C compiler (bcc) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2019-06-06 22:04 -0700
Re: Where can I find Barts C compiler (bcc) gazelle@shell.xmission.com (Kenny McCormack) - 2019-06-07 11:07 +0000
Re: Where can I find Barts C compiler (bcc) mertesthomas@gmail.com - 2019-06-11 14:59 -0700
Re: Where can I find Barts C compiler (bcc) unidef <jon@unidef-systems.com> - 2019-06-10 03:42 -0500
Page 2 of 2 — ← Prev page 1 [2]
| From | Bart <bc@freeuk.com> |
|---|---|
| Date | 2019-06-06 02:19 +0100 |
| Message-ID | <eSZJE.2518301$oQj.428389@fx12.am4> |
| In reply to | #144504 |
On 05/06/2019 23:46, Bart wrote:
> On 05/06/2019 22:29, mertesthomas@gmail.com wrote:
>> On Tuesday, 4 June 2019 22:14:27 UTC+2 bart...@gmail.com wrote:
>
>> I succeeded to compile Seed7 with bcc and a makefile.
>> This means that chkccomp.c produces most of version.h.
>> On my machine bcc can compile chkccomp.c and bcc is called
>> by chkccomp.c more than 100 times, to determine the
>> properties of bcc and the run-time library.
>>
>> When things are settled down I will send you this makefile.
>> So far so good. I was also able to run some programs.
>> Unfortunately there are test programs (the names start with chk...)
>> that fail. When interpreting the test program chkint.sd7 with:
>>
>> myPrompt>s7 chkint
>>
>> many things work correct, but at the end it fails with:
>>
>> ***** The integer lowestSetBit function does not work correct.
>> ***** The integer lowestSetBit function does not work correct.
>>
>> I was able to reduce the problem to the C program tst272.c below:
>
> OK, thanks. That was a simple fix now available on the github link.
>
> chkint now works. But out of the 17 chk* programs, 5 are not working:
>
> chkbig, chkcmd, chkflt, chkhent, chkscan
>
> I'll try a few things (mainly speculative),
That speculative work (changing some code-gen params, looking for
problems in bcc compiling generations of itself), yielded one more fix.
But only enough to run chkbig. The other four are still outstanding.
(bcc has been through 2-3 code generators; I don't like any of them. I
have a better one for another project, but adding it to bcc would be a
huge job. Being a C compiler and needing to interact with external C
programs, it needs to use the official Win64 ABI, which makes the work
harder.
BTW there is a known problem when a function in code compiled with bcc
is called from outside (from code not compiled with bcc). What is
normally a 'callback function. Typically, you see this with qsort, and
causes a crash.
The temporary fix (one compatible with other compilers) is to use this
before such functions:
#pragma $callback
Caused by my implementation of Win64 ABI not being strict enough. The
pragma saves and restores extra registers.)
[toc] | [prev] | [next] | [standalone]
| From | mertesthomas@gmail.com |
|---|---|
| Date | 2019-06-06 14:39 -0700 |
| Message-ID | <76f8875c-a4fc-401d-bc46-38975086e492@googlegroups.com> |
| In reply to | #144511 |
On Thursday, 6 June 2019 03:19:13 UTC+2 Bart wrote:
> On 05/06/2019 23:46, Bart wrote:
> > On 05/06/2019 22:29, mertes...@gmail.com wrote:
> >> On Tuesday, 4 June 2019 22:14:27 UTC+2 bart...@gmail.com wrote:
> >
> >> I succeeded to compile Seed7 with bcc and a makefile.
> >> This means that chkccomp.c produces most of version.h.
> >> On my machine bcc can compile chkccomp.c and bcc is called
> >> by chkccomp.c more than 100 times, to determine the
> >> properties of bcc and the run-time library.
> >>
> >> When things are settled down I will send you this makefile.
> >> So far so good. I was also able to run some programs.
> >> Unfortunately there are test programs (the names start with chk...)
> >> that fail. When interpreting the test program chkint.sd7 with:
> >>
> >> myPrompt>s7 chkint
> >>
> >> many things work correct, but at the end it fails with:
> >>
> >> ***** The integer lowestSetBit function does not work correct.
> >> ***** The integer lowestSetBit function does not work correct.
> >>
> >> I was able to reduce the problem to the C program tst272.c below:
> >
> > OK, thanks. That was a simple fix now available on the github link.
> >
> > chkint now works. But out of the 17 chk* programs, 5 are not working:
> >
> > chkbig, chkcmd, chkflt, chkhent, chkscan
> >
> > I'll try a few things (mainly speculative),
>
> That speculative work (changing some code-gen params, looking for
> problems in bcc compiling generations of itself), yielded one more fix.
>
> But only enough to run chkbig. The other four are still outstanding.
I tested chkstr.sd7 and the functions lower() and upper() cause
problems.
I was able to reduce the problem to the C program tst275.c below:
---------- begin tst275.c ----------
#include "stdio.h"
typedef unsigned int strElemType;
typedef unsigned long memSizeType;
void toLower (const strElemType *const source, memSizeType length,
strElemType *const dest)
{
strElemType ch;
/* toLower */
ch = source[0];
switch (ch >> 8) {
case 0:
ch = (strElemType) ((unsigned char)
"\0\1\2\3\4\5\6\7\10\11\12\13\14\15\16\17"
"\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37"
" !\"#$%&'()*+,-./0123456789:;<=>?"
"@abcdefghijklmnopqrstuvwxyz[\\]^_"
"`abcdefghijklmnopqrstuvwxyz{|}~\177"[ch]);
break;
} /* switch */
dest[0] = ch;
} /* toLower */
int main (int argc, char *argv[])
{
strElemType inBuf[1];
strElemType outBuf[1];
inBuf[0] = (strElemType) 'a';
toLower(inBuf, (memSizeType) 1, outBuf);
printf("%d expected 97\n", (int) outBuf[0]);
return 0;
}
---------- begin tst275.c ----------
Compiling the test program with gcc works okay:
myPrompt>gcc tst275.c -o tst275.exe
myPrompt>tst275
97 expected 97
Compiling tst275.c with bcc and running it shows a bug:
myPrompt>bartsc tst275.c
Compiling tst275.c to tst275.exe
myPrompt>tst275
0 expected 97
I hope this test program helps you to fix this bug.
Regards,
Thomas Mertes
--
Seed7 Homepage: http://seed7.sourceforge.net
Seed7 - The extensible programming language: User defined statements
and operators, abstract data types, templates without special
syntax, OO with interfaces and multiple dispatch, statically typed,
interpreted or compiled, portable, runs under linux/unix/windows.
[toc] | [prev] | [next] | [standalone]
| From | Bart <bc@freeuk.com> |
|---|---|
| Date | 2019-06-06 23:54 +0100 |
| Message-ID | <OQgKE.971079$yl5.247782@fx19.am4> |
| In reply to | #144548 |
On 06/06/2019 22:39, mertesthomas@gmail.com wrote: > On Thursday, 6 June 2019 03:19:13 UTC+2 Bart wrote: > I tested chkstr.sd7 and the functions lower() and upper() cause > problems. > > I was able to reduce the problem to the C program tst275.c below: > "\0\1\2\3\4\5\6\7\10\11\12\13\14\15\16\17" bcc doesn't like that leading zero, which in one place is used to test for an empty string rather than using its length. But is fixed now. Wide strings are not affected.
[toc] | [prev] | [next] | [standalone]
| From | mertesthomas@gmail.com |
|---|---|
| Date | 2019-06-09 07:05 -0700 |
| Message-ID | <4c9c6786-7f84-4cf6-b19e-eb35c1ee73be@googlegroups.com> |
| In reply to | #144550 |
On Friday, 7 June 2019 00:54:46 UTC+2 Bart wrote:
> On 06/06/2019 22:39, mertes...@gmail.com wrote:
> > On Thursday, 6 June 2019 03:19:13 UTC+2 Bart wrote:
>
> > I tested chkstr.sd7 and the functions lower() and upper() cause
> > problems.
> >
> > I was able to reduce the problem to the C program tst275.c below:
>
> > "\0\1\2\3\4\5\6\7\10\11\12\13\14\15\16\17"
>
> bcc doesn't like that leading zero, which in one place is used to test
> for an empty string rather than using its length. But is fixed now. Wide
> strings are not affected.
Thank you for that fix. Now chkstr.sd7 works.
In the meantime I found something related to floating point.
I was able to reduce the problem to the C program tst276.c below:
---------- begin tst276.c ----------
#include "stdio.h"
#include "math.h"
#include "float.h"
#define DOUBLE_STR_LARGE_NUMBER 1.0e15
void doubleToCharBuffer (const double doubleValue,
const double largeNumber)
{
printf("Expected: 1.00000000000000e+015, found: %1.14e\n", largeNumber);
}
void fltStr (double number)
{
if (!isnan(number)) {
doubleToCharBuffer(number, DOUBLE_STR_LARGE_NUMBER);
} /* if */
}
int main (int argc, char *argv[])
{
fltStr(1.00000000000000e-308);
return 0;
}
---------- end tst276.c ----------
With gcc this program works okay:
Expected: 1.00000000000000e+015, found: 1.00000000000000e+015
When I compile and run this program with bcc I get:
Expected: 1.00000000000000e+015, found: 1.#INF0000000000e+000
Without the check for isnan() the error is not present.
This error triggers that the function doubleToCharBuffer()
returns "0.0" for many integers, that are definitely not zero.
I hope this test program helps you to fix this bug.
Regards,
Thomas Mertes
--
Seed7 Homepage: http://seed7.sourceforge.net
Seed7 - The extensible programming language: User defined statements
and operators, abstract data types, templates without special
syntax, OO with interfaces and multiple dispatch, statically typed,
interpreted or compiled, portable, runs under linux/unix/windows.
[toc] | [prev] | [next] | [standalone]
| From | Bart <bc@freeuk.com> |
|---|---|
| Date | 2019-06-09 16:12 +0100 |
| Message-ID | <Jh9LE.1108923$da5.286639@fx13.am4> |
| In reply to | #144666 |
On 09/06/2019 15:05, mertesthomas@gmail.com wrote: > In the meantime I found something related to floating point. OK, but if you don't mind, I've moved this thread to the comp.lang.misc group. Look for the new thread 'Seed7 and bcc' (it will be the only recent one), where I've already posted on this. Thanks, bart.
[toc] | [prev] | [next] | [standalone]
| From | mertesthomas@gmail.com |
|---|---|
| Date | 2019-06-09 10:14 -0700 |
| Message-ID | <04dd8a56-a520-40fe-98e1-c3ccd6fb61b2@googlegroups.com> |
| In reply to | #144667 |
On Sunday, 9 June 2019 17:08:35 UTC+2 Bart wrote: > On 09/06/2019 15:05, mertes...@gmail.com wrote: > > > In the meantime I found something related to floating point. > > OK, but if you don't mind, I've moved this thread to the comp.lang.misc > group. Ok, but I am wondering why. IMHO this thread fits to comp.lang.c. The discussion in this thread is about compiling a C program with a C compiler. And the C compiler itself is written in C. The programs exchanged in this thread were also written in C. I ask myself: What does fit better in comp.lang.c? > Look for the new thread 'Seed7 and bcc' (it will be the only recent > one), where I've already posted on this. Ok, I invite everybody interested in this discussion to comp.lang.misc. Regards, Thomas Mertes -- Seed7 Homepage: http://seed7.sourceforge.net Seed7 - The extensible programming language: User defined statements and operators, abstract data types, templates without special syntax, OO with interfaces and multiple dispatch, statically typed, interpreted or compiled, portable, runs under linux/unix/windows.
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2019-06-09 20:07 +0100 |
| Message-ID | <8736ki1st0.fsf@bsb.me.uk> |
| In reply to | #144671 |
mertesthomas@gmail.com writes: > On Sunday, 9 June 2019 17:08:35 UTC+2 Bart wrote: >> On 09/06/2019 15:05, mertes...@gmail.com wrote: >> >> > In the meantime I found something related to floating point. >> >> OK, but if you don't mind, I've moved this thread to the comp.lang.misc >> group. <cut> >> Look for the new thread 'Seed7 and bcc' (it will be the only recent >> one), where I've already posted on this. > > Ok, I invite everybody interested in this discussion to > comp.lang.misc. There's a technical way to do that. You post here (possibly cross-posting to comp.lang.misc), but you set the Followup-To header to comp.lang-misc as I've done here. -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | gazelle@shell.xmission.com (Kenny McCormack) |
|---|---|
| Date | 2019-06-09 21:57 +0000 |
| Message-ID | <qdjvc8$in9$1@news.xmission.com> |
| In reply to | #144673 |
In article <8736ki1st0.fsf@bsb.me.uk>, Ben Bacarisse <ben.usenet@bsb.me.uk> wrote: >mertesthomas@gmail.com writes: > >> On Sunday, 9 June 2019 17:08:35 UTC+2 Bart wrote: >>> On 09/06/2019 15:05, mertes...@gmail.com wrote: >>> >>> > In the meantime I found something related to floating point. >>> >>> OK, but if you don't mind, I've moved this thread to the comp.lang.misc >>> group. ><cut> >>> Look for the new thread 'Seed7 and bcc' (it will be the only recent >>> one), where I've already posted on this. >> >> Ok, I invite everybody interested in this discussion to >> comp.lang.misc. > >There's a technical way to do that. You post here (possibly >cross-posting to comp.lang.misc), but you set the Followup-To header to >comp.lang-misc as I've done here. Didn't work. -- The randomly chosen signature file that would have appeared here is more than 4 lines long. As such, it violates one or more Usenet RFCs. In order to remain in compliance with said RFCs, the actual sig can be found at the following URL: http://user.xmission.com/~gazelle/Sigs/ForFoxViewers
[toc] | [prev] | [next] | [standalone]
| From | fir <profesor.fir@gmail.com> |
|---|---|
| Date | 2019-06-09 17:16 -0700 |
| Message-ID | <b9f0c9f8-9d3e-44f6-a287-8c0a1fc9ee32@googlegroups.com> |
| In reply to | #144671 |
W dniu niedziela, 9 czerwca 2019 19:14:41 UTC+2 użytkownik mertes...@gmail.com napisał: > On Sunday, 9 June 2019 17:08:35 UTC+2 Bart wrote: > > On 09/06/2019 15:05, mertes...@gmail.com wrote: > > > > > In the meantime I found something related to floating point. > > > > OK, but if you don't mind, I've moved this thread to the comp.lang.misc > > group. > > Ok, but I am wondering why. IMHO this thread fits to comp.lang.c. > > The discussion in this thread is about compiling a C program > with a C compiler. And the C compiler itself is written in C. > The programs exchanged in this thread were also written in C. > > I ask myself: What does fit better in comp.lang.c? > > > Look for the new thread 'Seed7 and bcc' (it will be the only recent > > one), where I've already posted on this. > > Ok, I invite everybody interested in this discussion to > comp.lang.misc. > > Regards, > Thomas Mertes > it fits here imo, im not interested but will not say it dont fits c and c programming has many 'wings' and only some here think that this group is only for 'c standard' or 'c for noobs' and nothing more hovever i think some people should also care if not only something fits to c but if it is not to much noobish, false (bulshit), and if its interesting
[toc] | [prev] | [next] | [standalone]
| From | Tim Rentsch <tr.17687@z991.linuxsc.com> |
|---|---|
| Date | 2019-06-06 22:04 -0700 |
| Message-ID | <865zpi9eaj.fsf@mailhub.linuxsc.com> |
| In reply to | #144548 |
mertesthomas@gmail.com writes: > On Thursday, 6 June 2019 03:19:13 UTC+2 Bart wrote: >> > [...] As you are now engaged in what amounts to a private conversation between yourself and Bart, may I suggest that the conversation be continued via email rather than in the newsgroup? Thanks.
[toc] | [prev] | [next] | [standalone]
| From | gazelle@shell.xmission.com (Kenny McCormack) |
|---|---|
| Date | 2019-06-07 11:07 +0000 |
| Message-ID | <qddght$9ie$2@news.xmission.com> |
| In reply to | #144562 |
In article <865zpi9eaj.fsf@mailhub.linuxsc.com>,
Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
>mertesthomas@gmail.com writes:
>
>> On Thursday, 6 June 2019 03:19:13 UTC+2 Bart wrote:
>>>
>> [...]
>
>As you are now engaged in what amounts to a private conversation
>between yourself and Bart, may I suggest that the conversation
>be continued via email rather than in the newsgroup? Thanks.
I totally disagree. I am finding this conversation quite interesting.
"bcc" looks like it may be worth looking into.
Tim, you might want to google the word "killfile".
--
Christianity is not a religion.
- Rick C Hodgin -
[toc] | [prev] | [next] | [standalone]
| From | mertesthomas@gmail.com |
|---|---|
| Date | 2019-06-11 14:59 -0700 |
| Message-ID | <fadb4972-d94d-405e-b1e7-850994d5f917@googlegroups.com> |
| In reply to | #144577 |
On Friday, 7 June 2019 13:07:50 UTC+2 Kenny McCormack wrote: > In article <865zpi9eaj.fsf@mailhub.linuxsc.com>, > Tim Rentsch <tr.17687@z991.linuxsc.com> wrote: > >mertes...@gmail.com writes: > > > >> On Thursday, 6 June 2019 03:19:13 UTC+2 Bart wrote: > >>> > >> [...] > > > >As you are now engaged in what amounts to a private conversation > >between yourself and Bart, may I suggest that the conversation > >be continued via email rather than in the newsgroup? Thanks. > > I totally disagree. I am finding this conversation quite interesting. Thank you. Just in case you do not follow the moved discussion in comp.lang.misc I give you an update: Compilation of the Seed7 interpreter with bcc succeeded. Several regression test programs succeed also. Unfortunately these test programs are not C regression test programs, but Seed7 regression test programs. The difference is: I assume that the C compiler works correct and the regression test concentrate on: - Implementation dependent things of C. - C library functions. - The Seed7 run-time libraries. - The Seed7 --> C compiler and its optimizations. Many of these regression test programs work very systematically and check many corner cases. So my regression tests check many aspects of C, but they are NOT a systematic check of C and its run-time library. BTW.: If you want to experiment yourself: I just released a new version of Seed7 with several adjustments, that help compilation with bcc. Unfortunately I had not the time to release the makefile I created for bcc. There are also some more issues with bcc: - Some floating point things still do not pass my regression test suite. - System functions such as qsort(), which call back functions defined in the program do not work correct. Regards, Thomas Mertes -- Seed7 Homepage: http://seed7.sourceforge.net Seed7 - The extensible programming language: User defined statements and operators, abstract data types, templates without special syntax, OO with interfaces and multiple dispatch, statically typed, interpreted or compiled, portable, runs under linux/unix/windows.
[toc] | [prev] | [next] | [standalone]
| From | unidef <jon@unidef-systems.com> |
|---|---|
| Date | 2019-06-10 03:42 -0500 |
| Message-ID | <lcWdnelsFfJlimPBnZ2dnUU7-I_NnZ2d@giganews.com> |
| In reply to | #144271 |
Bart <bc@freeuk.com> wrote: > On 31/05/2019 14:14, Bart wrote: >> On 31/05/2019 08:18, mertesthomas@gmail.com wrote: >>> On Tuesday, May 28, 2019 at 12:34:04 UTC+2 Bart wrote: >> >>>> If you still want to try it again, let me know in this thread and I will >>>> post a link. But you will get the same results. >>> >>> Yes, I would like to try it again. >> >> OK, I will try and make 'bcc' available again over this weekend. > >> Files (and links to binaries) should appear here: >> >> https://github.com/sal55/qx/tree/master/Seed7 >> > > I've now made available cc_win64.c and bcc.exe accessible via that link. > > I was able to use that version to build my slightly modified Seed7 > sources from December 2018, and that in turn was able to run a range of > .sd7 programs. > > This version used your winsock2.h. > > However I don't know what it will do on a fresh, unmodified Seed7 > version. More details are at that link. > > (I don't know how the current bcc program compares with that from six > months ago. Run 'bcc -help' and 'bcc -info' for up-to-date instructions. > > I think the posted version is set to use external .asm files, so might > be a bit slower, but it still built the 130 Seed7 modules in 1.6 seconds.) > Have you tried searching around archive.org? -- “There is nothing certain in this world, aside from Death or Taxes” - Benjamin Franklin
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | comp.lang.c
csiph-web