Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"Let us condemn to hellfire all those who disagree with us." -- militant religionists everywhere


devel / comp.lang.c / Effect of CPP tags

SubjectAuthor
* Effect of CPP tagsJanis Papanagnou
+- Re: Effect of CPP tagsLowell Gilbert
+* Re: Effect of CPP tagsKaz Kylheku
|`* Re: Effect of CPP tagsSpiros Bousbouras
| `- Re: Effect of CPP tagsTim Rentsch
+* Re: Effect of CPP tagsJanis Papanagnou
|+* Re: Effect of CPP tagsLowell Gilbert
||+* Re: Effect of CPP tagsKeith Thompson
|||`* Re: Effect of CPP tagsKaz Kylheku
||| `* Re: Effect of CPP tagsKeith Thompson
|||  `* Re: Effect of CPP tagsTim Rentsch
|||   `* Re: Effect of CPP tagsKaz Kylheku
|||    +- Re: Effect of CPP tagsJames Kuyper
|||    +* Re: Effect of CPP tagsJames Kuyper
|||    |`* Re: Effect of CPP tagsKaz Kylheku
|||    | +* Re: Effect of CPP tagsJames Kuyper
|||    | |`- Re: Effect of CPP tagsTim Rentsch
|||    | `* Re: Effect of CPP tagsTim Rentsch
|||    |  `* Re: Effect of CPP tagsKeith Thompson
|||    |   +- Re: Effect of CPP tagsDavid Brown
|||    |   +* Re: Effect of CPP tagsTim Rentsch
|||    |   |`- Re: Effect of CPP tagsKeith Thompson
|||    |   `- Re: Effect of CPP tagsTim Rentsch
|||    `- Re: Effect of CPP tagsTim Rentsch
||+* Re: Effect of CPP tagsKaz Kylheku
|||+- Re: Effect of CPP tagsKaz Kylheku
|||`* Re: Effect of CPP tagsLowell Gilbert
||| `- Re: Effect of CPP tagsJanis Papanagnou
||`* Re: Effect of CPP tagsJanis Papanagnou
|| `- Re: Effect of CPP tagsKaz Kylheku
|+- Re: Effect of CPP tagsKaz Kylheku
|`* Re: Effect of CPP tagsScott Lurndal
| +* Re: Effect of CPP tagsJanis Papanagnou
| |`* Re: Effect of CPP tagsKeith Thompson
| | +* Re: Effect of CPP tagsScott Lurndal
| | |`* Re: Effect of CPP tagsDavid Brown
| | | `* Re: Effect of CPP tagsJames Kuyper
| | |  `- Re: Effect of CPP tagsDavid Brown
| | `- Re: Effect of CPP tagsTim Rentsch
| `- usleep (Was: Effect of CPP tags)Kenny McCormack
+* Re: Effect of CPP tagsLawrence D'Oliveiro
|`* Re: Effect of CPP tagsBart
| +* Re: Effect of CPP tagsDavid Brown
| |`* Re: Effect of CPP tagsKeith Thompson
| | `* Re: Effect of CPP tagsKaz Kylheku
| |  `* Re: Effect of CPP tagsBart
| |   +* Re: Effect of CPP tagsLawrence D'Oliveiro
| |   |`* Re: Effect of CPP tagsBart
| |   | `* Re: Effect of CPP tagsLawrence D'Oliveiro
| |   |  `* Re: Effect of CPP tagsBart
| |   |   +* Re: Effect of CPP tagsScott Lurndal
| |   |   |+* Re: Effect of CPP tagsDavid Brown
| |   |   ||`- Re: Effect of CPP tagsBGB
| |   |   |`* Re: Effect of CPP tagsBart
| |   |   | `- Re: Effect of CPP tagsDavid Brown
| |   |   `- Re: Effect of CPP tagsLawrence D'Oliveiro
| |   `* Re: Effect of CPP tagsDavid Brown
| |    +* Re: Effect of CPP tagsBart
| |    |+- Re: Effect of CPP tagsScott Lurndal
| |    |+* Re: Effect of CPP tagsKaz Kylheku
| |    ||+* Re: Effect of CPP tagsBart
| |    |||`* Re: Effect of CPP tagsBart
| |    ||| +- Re: Effect of CPP tagsKeith Thompson
| |    ||| `* Re: Effect of CPP tagsKaz Kylheku
| |    |||  `* Re: Effect of CPP tagsKeith Thompson
| |    |||   +* Re: Effect of CPP tagsJanis Papanagnou
| |    |||   |`- Re: Effect of CPP tagsKeith Thompson
| |    |||   `- Re: Effect of CPP tagsKaz Kylheku
| |    ||`- Re: Effect of CPP tagsScott Lurndal
| |    |`- Re: Effect of CPP tagsDavid Brown
| |    `* Re: Effect of CPP tagsLawrence D'Oliveiro
| |     +* Re: Effect of CPP tagsChris M. Thomasson
| |     |`* Re: Effect of CPP tagsLawrence D'Oliveiro
| |     | `* Re: Effect of CPP tagsChris M. Thomasson
| |     |  `* Re: Effect of CPP tagsLawrence D'Oliveiro
| |     |   +- Re: Effect of CPP tagsChris M. Thomasson
| |     |   +- Re: Effect of CPP tagsChris M. Thomasson
| |     |   +- Re: Effect of CPP tagsKaz Kylheku
| |     |   `- Re: Effect of CPP tagsBlue-Maned_Hawk
| |     +* Re: Effect of CPP tagsDavid Brown
| |     |+* Re: Effect of CPP tagsBart
| |     ||+* Re: Effect of CPP tagsDavid Brown
| |     |||+- Re: Effect of CPP tagsBlue-Maned_Hawk
| |     |||`* Re: Effect of CPP tagsBart
| |     ||| `* Re: Effect of CPP tagsDavid Brown
| |     |||  `* Re: Effect of CPP tagsBart
| |     |||   +* Re: Effect of CPP tagsChris M. Thomasson
| |     |||   |`- Re: Effect of CPP tagsChris M. Thomasson
| |     |||   +* Re: Effect of CPP tagstTh
| |     |||   |+- Re: Effect of CPP tagsLawrence D'Oliveiro
| |     |||   |+- Re: Effect of CPP tagsKaz Kylheku
| |     |||   |`* Re: Effect of CPP tagsBart
| |     |||   | `* Re: Effect of CPP tagsScott Lurndal
| |     |||   |  `* Re: Effect of CPP tagsBart
| |     |||   |   `* Re: Effect of CPP tagsDavid Brown
| |     |||   |    +* Re: Effect of CPP tagsKaz Kylheku
| |     |||   |    |`* Re: Effect of CPP tagsDavid Brown
| |     |||   |    | `- Re: Effect of CPP tagsKaz Kylheku
| |     |||   |    `* Re: Effect of CPP tagsBart
| |     |||   |     +* Re: Effect of CPP tagsScott Lurndal
| |     |||   |     |`* Re: Effect of CPP tagsBart
| |     |||   |     `* Re: Effect of CPP tagsDavid Brown
| |     |||   `* Re: Effect of CPP tagsDavid Brown
| |     ||`* Re: Effect of CPP tagsBlue-Maned_Hawk
| |     |`* Re: Effect of CPP tagsLawrence D'Oliveiro
| |     `* Re: Effect of CPP tagsKaz Kylheku
| +- Re: Effect of CPP tagsRichard Damon
| +* Re: Effect of CPP tagsKaz Kylheku
| +* Re: Effect of CPP tagsBlue-Maned_Hawk
| `- Re: Effect of CPP tagsLawrence D'Oliveiro
`* Re: Effect of CPP tagsTim Rentsch

Pages:123456789101112131415161718192021222324252627
Re: Effect of CPP tags

<unlhko$2dhg6$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.swapon.de!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c
Subject: Re: Effect of CPP tags
Date: Tue, 9 Jan 2024 23:40:07 -0800
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <unlhko$2dhg6$1@dont-email.me>
References: <umet9d$3hir9$1@dont-email.me> <uncq37$pvae$1@dont-email.me>
<uncqg5$pust$2@dont-email.me> <87cyuern6k.fsf@nosuchdomain.example.com>
<unct09$q65q$4@dont-email.me> <unedki$13tlb$1@dont-email.me>
<unegb1$148mk$2@dont-email.me> <ungr21$1hleq$1@dont-email.me>
<unh5p4$1j81h$1@dont-email.me> <unhjme$1ld24$1@dont-email.me>
<uni64g$1nrsb$1@dont-email.me> <unislv$1u3j0$1@dont-email.me>
<unj9l0$1vr6j$1@dont-email.me> <unjmqs$21nsj$1@dont-email.me>
<unk0q8$23dum$1@dont-email.me> <unk4tm$2408t$1@dont-email.me>
<unkblm$2566s$1@dont-email.me> <8734v6p5s1.fsf@nosuchdomain.example.com>
<unke3h$25ia0$1@dont-email.me> <unkhql$25uof$1@dont-email.me>
<unkkp3$26g9o$1@dont-email.me> <87ttnmnjdb.fsf@nosuchdomain.example.com>
<unkp1b$270v8$1@dont-email.me> <unkthi$5cv$1@news.gegeweb.eu>
<20240109212820.166@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 10 Jan 2024 07:40:08 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="895382d1d7b553b27dcc9759fae19b1a";
logging-data="2541062"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/5aonb4wfBWUoMYStX2UAtbe2wXMs6bjY="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:R2B504H6HZONEdkjSIGewB2WHbs=
In-Reply-To: <20240109212820.166@kylheku.com>
Content-Language: en-US
 by: Chris M. Thomasson - Wed, 10 Jan 2024 07:40 UTC

On 1/9/2024 9:28 PM, Kaz Kylheku wrote:
> On 2024-01-10, tTh <tth@none.invalid> wrote:
>> On 1/10/24 01:40, Bart wrote:
>>> An easy compiler is one where you just do:
>>>
>>>    gcc prog
>>>
>>> and not, at the very least:
>>>
>>>    gcc prog.c -prog.exe -std=c11 -pedantic-errors
>>>
>>> Meanwhile I routinely test C programs on half a dozen compilers. I can't
>>> be bothered with all this crap.
>>
>> So do as all of us do : put this crap in a Makefile or
>> a shell script, and forget about it.
>
> Please don't get Bart started on makefiles!
>

Don't get me started about freaking out for some minutes when I failed
to use a god damn tab! My makefile would not work. God damn it! Ahhhh,
that was around 20 years ago.

Re: Effect of CPP tags

<unll0n$2e1i8$1@dont-email.me>

  copy mid

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

  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: Effect of CPP tags
Date: Wed, 10 Jan 2024 09:37:42 +0100
Organization: A noiseless patient Spider
Lines: 137
Message-ID: <unll0n$2e1i8$1@dont-email.me>
References: <umet9d$3hir9$1@dont-email.me> <unedki$13tlb$1@dont-email.me>
<unegb1$148mk$2@dont-email.me> <ungr21$1hleq$1@dont-email.me>
<unh5p4$1j81h$1@dont-email.me> <unhjme$1ld24$1@dont-email.me>
<uni64g$1nrsb$1@dont-email.me> <unislv$1u3j0$1@dont-email.me>
<unj9l0$1vr6j$1@dont-email.me> <unjmqs$21nsj$1@dont-email.me>
<unk0q8$23dum$1@dont-email.me> <unk4tm$2408t$1@dont-email.me>
<unkblm$2566s$1@dont-email.me> <8734v6p5s1.fsf@nosuchdomain.example.com>
<unke3h$25ia0$1@dont-email.me> <qhjnN.136894$Ama9.92332@fx12.iad>
<unkgvp$25vrm$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 10 Jan 2024 08:37:43 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="58a88cda71ba7fb7026f039432dee052";
logging-data="2557512"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18+X/LwVIFRFkw5hYqWscOuTXOGe0sIfW4="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:0ttmShhSTfP6Dta5Ffu+5G0GLS8=
Content-Language: en-GB
In-Reply-To: <unkgvp$25vrm$1@dont-email.me>
 by: David Brown - Wed, 10 Jan 2024 08:37 UTC

On 09/01/2024 23:22, Bart wrote:
> On 09/01/2024 21:55, Scott Lurndal wrote:
>> Bart <bc@freeuk.cm> writes:
>
>>> Which version of C do you suggest; the one where:
>>>
>>>    #include <stdio.h>
>>>
>>>    int main(void) {
>>>        int A[0];
>>>        int B[]={};
>>>
>>>        printf("%zu\n", sizeof(A));
>>>        printf("%zu\n", sizeof(B));
>>>    }
>>>
>>> compiles fine with tcc, gcc and clang, and displays 0 for the sizes?
>>>
>>> Or the one where those produce warnings? Or the one where it actually
>>> fails?
>>
>> All of them.  You've been told over, and over, and over.
>
> Been told what? That I should produce a compiler that, at anyone's whim,
> can either pass, fail or warn about the same piece of code?

No, you have been told:

1. C is a language defined by the standards. Without further
qualification, "C" refers to the latest published ISO standard -
currently C17. But it's also fine to refer to specific standards, such
as C99. The standards define the language syntax, constraints, required
diagnostics (implementations are free to choose warnings or hard
errors), and standard library specifications. There are also many
pre-standard C versions, for which "K&R C" is /almost/ a standard.

2. Almost all C compilers implement some extensions by default. These
extensions are not C, but are compiler-specific language variants. Some
people find them useful, other people prefer to stick to standard C.
Some extensions are so widely implemented that they may be considered a
pseudo-standard, others are very compiler or target specific.

3. Almost all C compilers have default warnings and errors that do not
match the standards requirements for C. Often they do this in both
directions - failing to issue diagnostics on things that the standards
require, and also issuing errors (halting compilation) for things that
the standard allows. Almost all C compilers allow you to tune warnings
and errors.

4. Some C compilers aim to provide conforming modes, often for several
standard versions, even though they are non-conforming (see 2 and 3
above) by default. Others don't try to conform to any particular C
standard, and can only very loosely be called a C compiler.

5. A "C implementation" needs a compiler, a standard library, headers, a
linker, perhaps an assembler, and a way to run the program on the
target. These might be provided together, or combined from different
places. For example, Microsoft provides everything with their MSVC
tools. For gcc-based toolchains, GCC writes the compiler but does not
provide binaries. The assembler and linker often come from the binutils
project (which again does not provide binaries), but other assemblers
and linkers may be used. Various libraries may be used, depending on
the target, including glibc, newlib, musl, newlib-nano, redlib, avrlib,
and many others. Users can get the parts individually, or more often
they get packaged toolchains from Debian, Redhat, TDM, mingw-64, MS WSL,
NXP, TI, Microchip, or many others according to their needs.

Is any of that new to you? Can you honestly say you have not been told
all this, many, many times?

You /know/ how to make gcc and clang compile standard C. Yet you insist
on faking ignorance. You are either the most thick-witted programmer
around, or you are a dishonest troll who goes out of their way to spread
FUD. And we know you are not thick-witted.

>
>> $ cc --pedantic-errors -o /tmp/a /tmp/t.c
>> /tmp/t.c: In function 'main':
>> /tmp/t.c:4:7: error: ISO C forbids zero-size array 'A' [-Wpedantic]
>>     int A[0];
>>         ^
>> /tmp/t.c:5:11: error: ISO C forbids empty initializer braces [-Wpedantic]
>>     int B[]={};
>>             ^
>> /tmp/t.c:5:7: error: zero or negative size array 'B'
>>     int B[]={};
>>         ^
>> $
>
> So, DOES C HAVE ZERO-LENGTH ARRAYS OR NOT?
>

No.

> It's a really simple question!
>

With a really simple answer, known to anyone who has learned a
reasonable understanding of the C language - and certainly known to
anyone who has read the relevant part of the standard to see the answer
for themselves. (It is in 6.7.6.2p1 - the section with the cryptic and
barely incomprehensible title "Array declarators", in the chapter titled
"Declarations".)

> Because this program easily passes:
>
>   int A[0];
>
> This one doesn't, qne without needing to use -pedantic  or
> -pedantic-errors:
>
>   int A[-1];
>
> If the answer is No, why is gcc so reluctant to complain about it
> compared with the -1 size?
>

Zero-length arrays are a gcc extension. You can read about them here,
under the mysterious and hard-to-find section of the gcc manual titled
"Arrays of Length Zero" :

<https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html>

There are a large number of features of C99 that started off as gcc
extensions in the 90's, before being standardised for C99. Some were
used pretty much directly, others where changed or adapted before
standardisation. Zero-length arrays were not incorporated in C99, but
their main use-case was taken with a slightly modified syntax as
flexible array struct members. gcc has an entirely reasonable policy of
not removing extensions that existing code may rely on, even if there
are newer standard ways to get a similar effect.

Re: Effect of CPP tags

<unllp2$2e3a2$1@dont-email.me>

  copy mid

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

  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: Effect of CPP tags
Date: Wed, 10 Jan 2024 09:50:42 +0100
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <unllp2$2e3a2$1@dont-email.me>
References: <umet9d$3hir9$1@dont-email.me> <uncq37$pvae$1@dont-email.me>
<uncqg5$pust$2@dont-email.me> <87cyuern6k.fsf@nosuchdomain.example.com>
<unct09$q65q$4@dont-email.me> <unedki$13tlb$1@dont-email.me>
<unegb1$148mk$2@dont-email.me> <ungr21$1hleq$1@dont-email.me>
<unh5p4$1j81h$1@dont-email.me> <unhjme$1ld24$1@dont-email.me>
<uni64g$1nrsb$1@dont-email.me> <unislv$1u3j0$1@dont-email.me>
<unj9l0$1vr6j$1@dont-email.me> <unjmqs$21nsj$1@dont-email.me>
<unk0q8$23dum$1@dont-email.me> <unk4tm$2408t$1@dont-email.me>
<unkblm$2566s$1@dont-email.me> <8734v6p5s1.fsf@nosuchdomain.example.com>
<unke3h$25ia0$1@dont-email.me> <unkhql$25uof$1@dont-email.me>
<unkkp3$26g9o$1@dont-email.me> <87ttnmnjdb.fsf@nosuchdomain.example.com>
<unkp1b$270v8$1@dont-email.me> <unkthi$5cv$1@news.gegeweb.eu>
<20240109212820.166@kylheku.com> <unlde3$2d2qu$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 10 Jan 2024 08:50:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="58a88cda71ba7fb7026f039432dee052";
logging-data="2559298"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX193q/cdywjRvxSy5I41NPCZyH0Lln1QULo="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:4kdw30J2Qk8wTYfFqKnuKnSavNM=
Content-Language: en-GB
In-Reply-To: <unlde3$2d2qu$1@dont-email.me>
 by: David Brown - Wed, 10 Jan 2024 08:50 UTC

On 10/01/2024 07:28, Lawrence D'Oliveiro wrote:
> On Wed, 10 Jan 2024 05:28:43 -0000 (UTC), Kaz Kylheku wrote:
>
>> Please don't get Bart started on makefiles!
>
> Does he prefer Ninja?

He prefers whining about what he has to type by hand. He'd rather spend
thousands of times more time, effort and keypresses complaining to
people here (none of whom are, AFAIK, the author of any "make" tool)
than he would need in order to write a little .bat file on his Windows
system.

It's incredible, really.

Re: Effect of CPP tags

<unlqea$2eqts$1@dont-email.me>

  copy mid

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

  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: Effect of CPP tags
Date: Wed, 10 Jan 2024 11:10:17 +0100
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <unlqea$2eqts$1@dont-email.me>
References: <umet9d$3hir9$1@dont-email.me> <uncq37$pvae$1@dont-email.me>
<uncqg5$pust$2@dont-email.me> <87cyuern6k.fsf@nosuchdomain.example.com>
<unct09$q65q$4@dont-email.me> <unedki$13tlb$1@dont-email.me>
<unegb1$148mk$2@dont-email.me> <ungr21$1hleq$1@dont-email.me>
<unh5p4$1j81h$1@dont-email.me> <unhjme$1ld24$1@dont-email.me>
<uni64g$1nrsb$1@dont-email.me> <unislv$1u3j0$1@dont-email.me>
<unj9l0$1vr6j$1@dont-email.me> <unjmqs$21nsj$1@dont-email.me>
<unk0q8$23dum$1@dont-email.me> <unk4tm$2408t$1@dont-email.me>
<unkblm$2566s$1@dont-email.me> <8734v6p5s1.fsf@nosuchdomain.example.com>
<unke3h$25ia0$1@dont-email.me> <unkhql$25uof$1@dont-email.me>
<unkkp3$26g9o$1@dont-email.me> <87ttnmnjdb.fsf@nosuchdomain.example.com>
<unkp1b$270v8$1@dont-email.me> <unkthi$5cv$1@news.gegeweb.eu>
<20240109212820.166@kylheku.com> <unlhko$2dhg6$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 10 Jan 2024 10:10:18 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="58a88cda71ba7fb7026f039432dee052";
logging-data="2583484"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+7RSPORAdUxjY/04a8+RPIVgPKcZLfM8U="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:Ep4KwJFeA/ILqpRgIHHdU9qoIJ4=
In-Reply-To: <unlhko$2dhg6$1@dont-email.me>
Content-Language: en-GB
 by: David Brown - Wed, 10 Jan 2024 10:10 UTC

On 10/01/2024 08:40, Chris M. Thomasson wrote:
> On 1/9/2024 9:28 PM, Kaz Kylheku wrote:
>> On 2024-01-10, tTh <tth@none.invalid> wrote:
>>> On 1/10/24 01:40, Bart wrote:
>>>> An easy compiler is one where you just do:
>>>>
>>>>      gcc prog
>>>>
>>>> and not, at the very least:
>>>>
>>>>      gcc prog.c -prog.exe -std=c11 -pedantic-errors
>>>>
>>>> Meanwhile I routinely test C programs on half a dozen compilers. I
>>>> can't
>>>> be bothered with all this crap.
>>>
>>>      So do as all of us do : put this crap in a Makefile or
>>>      a shell script, and forget about it.
>>
>> Please don't get Bart started on makefiles!
>>
>
> Don't get me started about freaking out for some minutes when I failed
> to use a god damn tab! My makefile would not work. God damn it! Ahhhh,
> that was around 20 years ago.

The author of "make" described the distinction between tabs and spaces
to be his worst mistake ever - but use of the tool took off too quickly
for him to change it.

The difference between Bart and everyone else is that when other people
make a tab mistake, they learn from it - and even 20 years on, you still
remember. Bart seems to forget things seconds after someone tells him
how to use any program that he has not written himself. (It takes him a
little longer to forget how his own programs and languages work.)

Re: Effect of CPP tags

<unlqqa$2eqts$2@dont-email.me>

  copy mid

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

  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: Effect of CPP tags
Date: Wed, 10 Jan 2024 11:16:42 +0100
Organization: A noiseless patient Spider
Lines: 58
Message-ID: <unlqqa$2eqts$2@dont-email.me>
References: <umet9d$3hir9$1@dont-email.me> <unhjme$1ld24$1@dont-email.me>
<uni64g$1nrsb$1@dont-email.me> <unislv$1u3j0$1@dont-email.me>
<unj9l0$1vr6j$1@dont-email.me> <unjmqs$21nsj$1@dont-email.me>
<unk0q8$23dum$1@dont-email.me> <unk4tm$2408t$1@dont-email.me>
<unkblm$2566s$1@dont-email.me> <8734v6p5s1.fsf@nosuchdomain.example.com>
<unke3h$25ia0$1@dont-email.me> <unkhql$25uof$1@dont-email.me>
<unkkp3$26g9o$1@dont-email.me> <87ttnmnjdb.fsf@nosuchdomain.example.com>
<unkp1b$270v8$1@dont-email.me> <ZSmnN.151217$c3Ea.70659@fx10.iad>
<unkuhp$27i0v$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 10 Jan 2024 10:16:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="58a88cda71ba7fb7026f039432dee052";
logging-data="2583484"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/cGJpNp6s7NOGqYZlorK4SADk8jBE5iFU="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:JvFENruNShObLvHF+948ERugLSM=
Content-Language: en-GB
In-Reply-To: <unkuhp$27i0v$2@dont-email.me>
 by: David Brown - Wed, 10 Jan 2024 10:16 UTC

On 10/01/2024 03:14, Bart wrote:
> On 10/01/2024 02:00, Scott Lurndal wrote:
>> Bart <bc@freeuk.cm> writes:
>>> On 10/01/2024 00:05, Keith Thompson wrote:
>>>> Bart <bc@freeuk.cm> writes:
>>
>>> An easy compiler is one where you just do:
>>>
>>>     gcc prog
>>>
>>> and not, at the very least:
>>>
>>>     gcc prog.c -prog.exe -std=c11 -pedantic-errors
>>
>>
>> $ functions c
>> function c
>> {
>>    gcc -o "$1" -std=c11 -pedantic-errors "$1".c
>> }
>> $ cat a.c
>> #include <stdio.h>
>>
>> int
>> main(int argc, const char **argv, const char **envp)
>> {
>>
>>      printf("Hello World\n");
>>
>>      return 0;
>> }
>> $ c a
>> $ ./a
>> Hello World
>>
>> Can't get any more concise than that.
>
> Great. Now tell the gcc people that's what it should do ANYWAY.

But it is /not/ what gcc should do.

You seem to be mixing up "what Bart wants" with "what countless other
people want". Write your own tools to revolve around your own selfish
needs if that's your preference, but don't expect everyone else to
change their worlds to suit /you/.

Scott wrote that as an example that might suit you. I am confident that
the compiler options he mostly uses are different from that - and that
he uses a variety of different options and different times, and that
they are different from the options /I/ use or anyone else uses. That's
why anyone who can actually use a compiler picks their options
themselves and uses tools to track them (whether it is a bash function,
a bat file, a makefile, an IDE, or any one of fifty different solutions
that are far better than whining to the wrong people - or even whining
to the right people).

Re: Effect of CPP tags

<unlr72$2eqts$3@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!nntp.comgw.net!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: Effect of CPP tags
Date: Wed, 10 Jan 2024 11:23:30 +0100
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <unlr72$2eqts$3@dont-email.me>
References: <umet9d$3hir9$1@dont-email.me> <RJAlN.141573$c3Ea.132913@fx10.iad>
<un6toq$3ogqm$1@dont-email.me> <%cFlN.140487$xHn7.115393@fx14.iad>
<slrnupeb0t.qme.jj@iridium.wf32df> <un7cjh$3qi9d$1@dont-email.me>
<un7eoj$3qpmp$1@dont-email.me> <un7ndt$3rr75$1@dont-email.me>
<un92c7$6325$1@dont-email.me> <un9va1$a752$1@dont-email.me>
<unb5d3$hum9$2@dont-email.me> <unb9uk$igst$1@dont-email.me>
<87jzomrvh8.fsf@nosuchdomain.example.com> <uncq37$pvae$1@dont-email.me>
<uncqg5$pust$2@dont-email.me> <87cyuern6k.fsf@nosuchdomain.example.com>
<unct09$q65q$4@dont-email.me> <unedki$13tlb$1@dont-email.me>
<unegb1$148mk$2@dont-email.me> <ungr21$1hleq$1@dont-email.me>
<unh5p4$1j81h$1@dont-email.me> <unhjme$1ld24$1@dont-email.me>
<uni64g$1nrsb$1@dont-email.me> <unislv$1u3j0$1@dont-email.me>
<unj9l0$1vr6j$1@dont-email.me> <unjmqs$21nsj$1@dont-email.me>
<unk0q8$23dum$1@dont-email.me> <unk4tm$2408t$1@dont-email.me>
<unkblm$2566s$1@dont-email.me> <20240109135137.49@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 10 Jan 2024 10:23:30 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="58a88cda71ba7fb7026f039432dee052";
logging-data="2583484"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18tWZEATxgTok1v/LLmyQv14z2M3iLd9BI="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:v3yAa77fFnUK9g9vLvhsZq/nwdM=
In-Reply-To: <20240109135137.49@kylheku.com>
Content-Language: en-GB
 by: David Brown - Wed, 10 Jan 2024 10:23 UTC

On 09/01/2024 23:12, Kaz Kylheku wrote:
> On 2024-01-09, Bart <bc@freeuk.cm> wrote:

>> Don't tell me: gcc has some option to warn of using octal literals. So
>> your 'successful' language relies on extensive extra tools (all the
>> stuff in that support truck) to keep it useable.
>
> Unfortunately, it is a cynical observation that languages that don't
> require tools tend not to attract people.

A less cynical observation would suggest that a successful language is
one that is used a lot, and therefore attracts additional tools that
make its use better.

Re: Effect of CPP tags

<unm1jm$2ft22$1@dont-email.me>

  copy mid

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

  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: Effect of CPP tags
Date: Wed, 10 Jan 2024 12:12:38 +0000
Organization: A noiseless patient Spider
Lines: 117
Message-ID: <unm1jm$2ft22$1@dont-email.me>
References: <umet9d$3hir9$1@dont-email.me> <unedki$13tlb$1@dont-email.me>
<unegb1$148mk$2@dont-email.me> <ungr21$1hleq$1@dont-email.me>
<unh5p4$1j81h$1@dont-email.me> <unhjme$1ld24$1@dont-email.me>
<uni64g$1nrsb$1@dont-email.me> <unislv$1u3j0$1@dont-email.me>
<unj9l0$1vr6j$1@dont-email.me> <unjmqs$21nsj$1@dont-email.me>
<unk0q8$23dum$1@dont-email.me> <unk4tm$2408t$1@dont-email.me>
<unkblm$2566s$1@dont-email.me> <8734v6p5s1.fsf@nosuchdomain.example.com>
<unke3h$25ia0$1@dont-email.me> <qhjnN.136894$Ama9.92332@fx12.iad>
<unkgvp$25vrm$1@dont-email.me> <unll0n$2e1i8$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 10 Jan 2024 12:12:39 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2b8a13f02598d83e6d39aee6a0dd3487";
logging-data="2618434"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Wv3REx7s1W2N/ZrX+gvMkZTUujgLyGzU="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:usmd/QnUpvMwT6YLVvOCdO/eTyo=
In-Reply-To: <unll0n$2e1i8$1@dont-email.me>
Content-Language: en-GB
 by: bart - Wed, 10 Jan 2024 12:12 UTC

On 10/01/2024 08:37, David Brown wrote:
> On 09/01/2024 23:22, Bart wrote:

> 1. C is a language defined by the standards.  Without further
> qualification, "C" refers to the latest published ISO standard -
> currently C17.  But it's also fine to refer to specific standards, such
> as C99.  The standards define the language syntax, constraints, required
> diagnostics (implementations are free to choose warnings or hard
> errors), and standard library specifications.  There are also many
> pre-standard C versions, for which "K&R C" is /almost/ a standard.
>
> 2. Almost all C compilers implement some extensions by default.  These
> extensions are not C, but are compiler-specific language variants.  Some
> people find them useful, other people prefer to stick to standard C.
> Some extensions are so widely implemented that they may be considered a
> pseudo-standard, others are very compiler or target specific.
>
> 3. Almost all C compilers have default warnings and errors that do not
> match the standards requirements for C.  Often they do this in both
> directions - failing to issue diagnostics on things that the standards
> require, and also issuing errors (halting compilation) for things that
> the standard allows.  Almost all C compilers allow you to tune warnings
> and errors.
>
> 4. Some C compilers aim to provide conforming modes, often for several
> standard versions, even though they are non-conforming (see 2 and 3
> above) by default.  Others don't try to conform to any particular C
> standard, and can only very loosely be called a C compiler.
>
> 5. A "C implementation" needs a compiler, a standard library, headers, a
> linker, perhaps an assembler, and a way to run the program on the
> target.  These might be provided together, or combined from different
> places.

My original implementation for Windows used these two files only:

bcc.exe (about 1MB)
msvcrt.dll

bcc.exe includes the compiler, headers and assembler (there was no linker).

My current one splits it up into 4 files:

mcc.exe (264KB)
aa.exe (Assembler, 94KB, still no linker)
msvcrt.dll
windows.h (optional)

A linker is only needed to statically combine my code with that from
other compilers.

>  For example, Microsoft provides everything with their MSVC
> tools.  For gcc-based toolchains, GCC writes the compiler but does not
> provide binaries.  The assembler and linker often come from the binutils
> project (which again does not provide binaries), but other assemblers
> and linkers may be used.  Various libraries may be used, depending on
> the target, including glibc, newlib, musl, newlib-nano, redlib, avrlib,
> and many others.  Users can get the parts individually, or more often
> they get packaged toolchains from Debian, Redhat, TDM, mingw-64, MS WSL,
> NXP, TI, Microchip, or many others according to their needs.

Other smaller C Windows compilers (lccwin, pellesc, dmc are older ones,
then there is tcc) are self-contained without any of that complexity, or
the need to divy up the implementation into assorted parts that all live
in different places or that have to be individually sourced.

>
> You /know/ how to make gcc and clang compile standard C.  Yet you insist
> on faking ignorance.  You are either the most thick-witted programmer
> around, or you are a dishonest troll who goes out of their way to spread
> FUD.  And we know you are not thick-witted.

Suppose you were given a C program to build. There are no instructions
(or there are instructions, but they are encoded inside some script in a
proprietory language that you don't understand and don't have a tool for).

How do you know what to tell gcc to compile it?

Suppose you took a program that you know perfectly well how to compile
with gcc, but you some reason you don't have it (maybe all instances of
gcc vanished overnight after some power blockout).

You have one or two lesser compilers with not many options; what do you
tell those how to compile that program?

(I'll make it easy and suggest neither program depends on gnu extensions.)

Both examples are basically my situation. I'm either building other
people' software, using a range of compilers (so if it works with A and
B with no special options, I'm not interested in pandering to gcc with a
huge laundry list of instructions)...

.... or I'm generating C code of my own, which used to be compilable with
half a dozen C compilers with NO SPECIAL OPTIONS, but now I support 3,
and one or two of them might need a special option.

So, in my world, I really don't want to know about all that gcc palaver.

(You go to rent a car. In most cases all you need is a key to open the
door and turn on the ignition. Except the car made by gcc, which needs a
dozen different keys, and a long list of configuration options to be set
first: wheels:4; LHD or RHD: RHD, etc.

You see my frustration? Using the C language should be driving a car.)

You already know I have no idea about what version of C is involved,
only that it needs to pass with the compilers I list using the options
(or lack of options) that I stipulate at the top of the source file.

But you will be able to infer that I don't depend in gnu C extensions.

> Zero-length arrays are a gcc extension.

I wonder how many thousands of lines of code it took to implement such
an extension?

Re: Effect of CPP tags

<unm5du$2ggel$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.neodome.net!news.nntp4.net!news.hispagatos.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: Effect of CPP tags
Date: Wed, 10 Jan 2024 14:17:49 +0100
Organization: A noiseless patient Spider
Lines: 107
Message-ID: <unm5du$2ggel$1@dont-email.me>
References: <umet9d$3hir9$1@dont-email.me> <unedki$13tlb$1@dont-email.me>
<unegb1$148mk$2@dont-email.me> <ungr21$1hleq$1@dont-email.me>
<unh5p4$1j81h$1@dont-email.me> <unhjme$1ld24$1@dont-email.me>
<uni64g$1nrsb$1@dont-email.me> <unislv$1u3j0$1@dont-email.me>
<unj9l0$1vr6j$1@dont-email.me> <unjmqs$21nsj$1@dont-email.me>
<unk0q8$23dum$1@dont-email.me> <unk4tm$2408t$1@dont-email.me>
<unkblm$2566s$1@dont-email.me> <8734v6p5s1.fsf@nosuchdomain.example.com>
<unke3h$25ia0$1@dont-email.me> <qhjnN.136894$Ama9.92332@fx12.iad>
<unkgvp$25vrm$1@dont-email.me> <unll0n$2e1i8$1@dont-email.me>
<unm1jm$2ft22$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 10 Jan 2024 13:17:50 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="58a88cda71ba7fb7026f039432dee052";
logging-data="2638293"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+F3Q5hgejzwXrlp4JZIIJy8Ki4c+s8ZMs="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:ya0RzZA3O3IHQJIjCB1l29Ww/1g=
In-Reply-To: <unm1jm$2ft22$1@dont-email.me>
Content-Language: en-GB
 by: David Brown - Wed, 10 Jan 2024 13:17 UTC

On 10/01/2024 13:12, bart wrote:
> On 10/01/2024 08:37, David Brown wrote:
>> On 09/01/2024 23:22, Bart wrote:
>
>> 1. C is a language defined by the standards.  Without further
>> qualification, "C" refers to the latest published ISO standard -
>> currently C17.  But it's also fine to refer to specific standards,
>> such as C99.  The standards define the language syntax, constraints,
>> required diagnostics (implementations are free to choose warnings or
>> hard errors), and standard library specifications.  There are also
>> many pre-standard C versions, for which "K&R C" is /almost/ a standard.
>>
>> 2. Almost all C compilers implement some extensions by default.  These
>> extensions are not C, but are compiler-specific language variants.
>> Some people find them useful, other people prefer to stick to standard
>> C. Some extensions are so widely implemented that they may be
>> considered a pseudo-standard, others are very compiler or target
>> specific.
>>
>> 3. Almost all C compilers have default warnings and errors that do not
>> match the standards requirements for C.  Often they do this in both
>> directions - failing to issue diagnostics on things that the standards
>> require, and also issuing errors (halting compilation) for things that
>> the standard allows.  Almost all C compilers allow you to tune
>> warnings and errors.
>>
>> 4. Some C compilers aim to provide conforming modes, often for several
>> standard versions, even though they are non-conforming (see 2 and 3
>> above) by default.  Others don't try to conform to any particular C
>> standard, and can only very loosely be called a C compiler.
>>
>> 5. A "C implementation" needs a compiler, a standard library, headers,
>> a linker, perhaps an assembler, and a way to run the program on the
>> target.  These might be provided together, or combined from different
>> places.
>
> My original implementation for Windows used these two files only:
>

No one cares. It does not matter how any particular C implementation
does it, it only matters that there are many ways to package them. I
gave examples purely as examples. The question is, do you understand
what I wrote above, and is anything there new or surprising to you?

>
>>   For example, Microsoft provides everything with their MSVC tools.
>> For gcc-based toolchains, GCC writes the compiler but does not provide
>> binaries.  The assembler and linker often come from the binutils
>> project (which again does not provide binaries), but other assemblers
>> and linkers may be used.  Various libraries may be used, depending on
>> the target, including glibc, newlib, musl, newlib-nano, redlib,
>> avrlib, and many others.  Users can get the parts individually, or
>> more often they get packaged toolchains from Debian, Redhat, TDM,
>> mingw-64, MS WSL, NXP, TI, Microchip, or many others according to
>> their needs.
>

No one cares.

>
>>
>> You /know/ how to make gcc and clang compile standard C.  Yet you
>> insist on faking ignorance.  You are either the most thick-witted
>> programmer around, or you are a dishonest troll who goes out of their
>> way to spread FUD.  And we know you are not thick-witted.
>
> Suppose you were given a C program to build. There are no instructions
> (or there are instructions, but they are encoded inside some script in a
> proprietory language that you don't understand and don't have a tool for).
>
> How do you know what to tell gcc to compile it?

I might make some guesses, because I know the typical flags needed for
gcc (as do you, as you have been told them countless times). If these
don't work and there are no clear instructions, I might ask the program
developers for more information. I might google for it, or ask
generally in appropriate forums (which comp.lang.c is not).

Without the slightest doubt, I can say that if it were possible to build
it using /your/ C compiler, and does not use extensions unsupported by
gcc, then I could get it to build with gcc without much trouble. I
think the same would apply to pretty much anyone who has some experience
using gcc from the command line.

>
> Suppose you took a program that you know perfectly well how to compile
> with gcc, but you some reason you don't have it (maybe all instances of
> gcc vanished overnight after some power blockout).

Now you sound as silly as that C90 fanatic who turns up here occasionally.

<snip>

>> Zero-length arrays are a gcc extension.
>
> I wonder how many thousands of lines of code it took to implement such
> an extension?
>

I have no idea. It was a good idea at the time, because C90 did not
have flexible array members. It is now pretty much unnecessary, though
I am sure some people use "[0]" instead of "[]" in their flexible array
struct members. And some might take advantage of gcc's slightly greater
flexibility here than the C standards define.

Re: Effect of CPP tags

<unm9o7$2h6ig$1@dont-email.me>

  copy mid

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

  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: Effect of CPP tags
Date: Wed, 10 Jan 2024 14:31:35 +0000
Organization: A noiseless patient Spider
Lines: 106
Message-ID: <unm9o7$2h6ig$1@dont-email.me>
References: <umet9d$3hir9$1@dont-email.me> <unedki$13tlb$1@dont-email.me>
<unegb1$148mk$2@dont-email.me> <ungr21$1hleq$1@dont-email.me>
<unh5p4$1j81h$1@dont-email.me> <unhjme$1ld24$1@dont-email.me>
<uni64g$1nrsb$1@dont-email.me> <unislv$1u3j0$1@dont-email.me>
<unj9l0$1vr6j$1@dont-email.me> <unjmqs$21nsj$1@dont-email.me>
<unk0q8$23dum$1@dont-email.me> <unk4tm$2408t$1@dont-email.me>
<unkblm$2566s$1@dont-email.me> <8734v6p5s1.fsf@nosuchdomain.example.com>
<unke3h$25ia0$1@dont-email.me> <qhjnN.136894$Ama9.92332@fx12.iad>
<unkgvp$25vrm$1@dont-email.me> <unll0n$2e1i8$1@dont-email.me>
<unm1jm$2ft22$1@dont-email.me> <unm5du$2ggel$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 10 Jan 2024 14:31:35 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2b8a13f02598d83e6d39aee6a0dd3487";
logging-data="2660944"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19HjHn3wNOvmKUYKO0/5ObROYbYtmwzMJA="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Npz5hhlftDGWGV3Rqf/aEpFSTkw=
In-Reply-To: <unm5du$2ggel$1@dont-email.me>
Content-Language: en-GB
 by: bart - Wed, 10 Jan 2024 14:31 UTC

On 10/01/2024 13:17, David Brown wrote:
> On 10/01/2024 13:12, bart wrote:

>>>   For example, Microsoft provides everything with their MSVC tools.
>>> For gcc-based toolchains, GCC writes the compiler but does not
>>> provide binaries.  The assembler and linker often come from the
>>> binutils project (which again does not provide binaries), but other
>>> assemblers and linkers may be used.  Various libraries may be used,
>>> depending on the target, including glibc, newlib, musl, newlib-nano,
>>> redlib, avrlib, and many others.  Users can get the parts
>>> individually, or more often they get packaged toolchains from Debian,
>>> Redhat, TDM, mingw-64, MS WSL, NXP, TI, Microchip, or many others
>>> according to their needs.
>>
>
> No one cares.

But you cared enough to list all those complicated ways that some have
implemented C. It sounded almost lovingly.

It's as though you're looking down disdainfully at all those seeking to
produce smaller simpler products: Here, THIS is how you produce a C
compiler! It has to be Big! And Slow! It has to be Complicated! It has
to have lots of Buttons!

You know, the most remarkable and impressive product for me is the Tiny
C compiler. It's Small. It's Fast. It's Simple.

For my generated C code, only 3 files of Tiny C, totalling 230KB, are
needed to turn it near-instantly into executable code. As a compiler
backend target, it's a solution that is 100 times smaller and 100 times
faster than LLVM.

Some people have different opinions about this stuff. C isn't your own
proprietory language that should only be processed with your stipulated
tool sets.

Anybody can implement their own ideas of how it should work. There are
reasons why those people put considerable efforts into those smaller,
self-contained and more user-friendly products.

Oh, I forgot, you don't care.

OK. Well I don't really care about what you're into either! I certainly
don't want to fuck about with -Wextra -Wpedantic -Wall -std=this -ofile
and all that nonsense, when a 10 seconds earlier I'd simpler done 'tcc
prog.c'.

For me a compiler should be as utilitarian and simple to use as a light
switch.

> Without the slightest doubt, I can say that if it were possible to build
> it using /your/ C compiler, and does not use extensions unsupported by
> gcc, then I could get it to build with gcc without much trouble.

You seem to be acknowledging the benefits of passing a code base through
a lesser compiler.

  I
> think the same would apply to pretty much anyone who has some experience
> using gcc from the command line.
>
>>
>> Suppose you took a program that you know perfectly well how to compile
>> with gcc, but you some reason you don't have it (maybe all instances
>> of gcc vanished overnight after some power blockout).
>
> Now you sound as silly as that C90 fanatic who turns up here occasionally.

There are any number of actual scenarios where that can happen. That is,
you don't have access to your favourite compiler.

I actually can supply a C program, and the C compiler needed to build it
into an executable, on a floppy disk, in most cases. It can be as little
as 3 files (source, compiler, assembler); it will be instantly obvious
if there's one missing, and what the implications would be.

What is the minimum number of actual (ie. not ZIP) files needed to
bundle gcc in the same way? Give me a number. (I guess you don't know; I
thought you knew your tools inside out!)

>> I wonder how many thousands of lines of code it took to implement such
>> an extension?
>>
>
> I have no idea.  It was a good idea at the time, because C90 did not
> have flexible array members.  It is now pretty much unnecessary, though
> I am sure some people use "[0]" instead of "[]" in their flexible array
> struct members.  And some might take advantage of gcc's slightly greater
> flexibility here than the C standards define.

I was thinking more of this:

void* table[] = {
// &a,
// &b,
// &c,
};

Temporarily comment out those entries (maybe they don't exist yet, or to
test how well program logic copes with an empty list).

Re: Effect of CPP tags

<U7ynN.143065$Wp_8.30410@fx17.iad>

  copy mid

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

  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!fx17.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: Effect of CPP tags
Newsgroups: comp.lang.c
References: <umet9d$3hir9$1@dont-email.me> <unj9l0$1vr6j$1@dont-email.me> <unjmqs$21nsj$1@dont-email.me> <unk0q8$23dum$1@dont-email.me> <unk4tm$2408t$1@dont-email.me> <unkblm$2566s$1@dont-email.me> <8734v6p5s1.fsf@nosuchdomain.example.com> <unke3h$25ia0$1@dont-email.me> <unkhql$25uof$1@dont-email.me> <unkkp3$26g9o$1@dont-email.me> <87ttnmnjdb.fsf@nosuchdomain.example.com> <unkp1b$270v8$1@dont-email.me> <ZSmnN.151217$c3Ea.70659@fx10.iad> <unkuhp$27i0v$2@dont-email.me> <unlqqa$2eqts$2@dont-email.me>
Lines: 84
Message-ID: <U7ynN.143065$Wp_8.30410@fx17.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Wed, 10 Jan 2024 14:49:24 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Wed, 10 Jan 2024 14:49:24 GMT
X-Received-Bytes: 3611
 by: Scott Lurndal - Wed, 10 Jan 2024 14:49 UTC

David Brown <david.brown@hesbynett.no> writes:
>On 10/01/2024 03:14, Bart wrote:
>> On 10/01/2024 02:00, Scott Lurndal wrote:
>>> Bart <bc@freeuk.cm> writes:
>>>> On 10/01/2024 00:05, Keith Thompson wrote:
>>>>> Bart <bc@freeuk.cm> writes:
>>>
>>>> An easy compiler is one where you just do:
>>>>
>>>>     gcc prog
>>>>
>>>> and not, at the very least:
>>>>
>>>>     gcc prog.c -prog.exe -std=c11 -pedantic-errors
>>>
>>>
>>> $ functions c
>>> function c
>>> {
>>>    gcc -o "$1" -std=c11 -pedantic-errors "$1".c
>>> }
>>> $ cat a.c
>>> #include <stdio.h>
>>>
>>> int
>>> main(int argc, const char **argv, const char **envp)
>>> {
>>>
>>>      printf("Hello World\n");
>>>
>>>      return 0;
>>> }
>>> $ c a
>>> $ ./a
>>> Hello World
>>>
>>> Can't get any more concise than that.
>>
>> Great. Now tell the gcc people that's what it should do ANYWAY.
>
>But it is /not/ what gcc should do.
>
>You seem to be mixing up "what Bart wants" with "what countless other
>people want". Write your own tools to revolve around your own selfish
>needs if that's your preference, but don't expect everyone else to
>change their worlds to suit /you/.
>
>
>Scott wrote that as an example that might suit you.

> I am confident that
>the compiler options he mostly uses are different from that - and that
>he uses a variety of different options and different times, and that
>they are different from the options /I/ use or anyone else uses.

Indeed. I use a Makefile and the Makefile.defs include alone has 373
lines - something sure to piss Bart off. Of course, the project
has:

SLOC Directory SLOC-by-Language (Sorted)
7316068 include ansic=7274603,cpp=41465
899374 tests python=763294,ansic=82789,asm=34873,cpp=18013,sh=405
885492 io cpp=603113,ansic=281285,python=466,sh=324,asm=304
133342 processor cpp=131855,python=1487
133153 3rd_party cpp=133033,sh=78,python=42
26803 tools python=17834,cpp=4300,sh=1903,ansic=1459,perl=1199,
ruby=108
16754 gen ansic=16754
10955 platform cpp=10955
8392 common cpp=8392
5290 bin cpp=5118,python=172
2204 cpc cpp=2204
1883 top_dir cpp=1883
1430 noc cpp=1430
560 shim cpp=560

SLOC doesn't include whitespace or comments.

That's about 10 million lines of code across several hundred source
and include files.

Yet, the entire application can be built with

$ make

Re: Effect of CPP tags

<L9ynN.143066$Wp_8.3075@fx17.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx17.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: Effect of CPP tags
Newsgroups: comp.lang.c
References: <umet9d$3hir9$1@dont-email.me> <unhjme$1ld24$1@dont-email.me> <uni64g$1nrsb$1@dont-email.me> <unislv$1u3j0$1@dont-email.me> <unj9l0$1vr6j$1@dont-email.me> <unjmqs$21nsj$1@dont-email.me> <unk0q8$23dum$1@dont-email.me> <unk4tm$2408t$1@dont-email.me> <unkblm$2566s$1@dont-email.me> <8734v6p5s1.fsf@nosuchdomain.example.com> <unke3h$25ia0$1@dont-email.me> <qhjnN.136894$Ama9.92332@fx12.iad> <unkgvp$25vrm$1@dont-email.me> <unll0n$2e1i8$1@dont-email.me> <unm1jm$2ft22$1@dont-email.me>
Lines: 8
Message-ID: <L9ynN.143066$Wp_8.3075@fx17.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Wed, 10 Jan 2024 14:51:23 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Wed, 10 Jan 2024 14:51:23 GMT
X-Received-Bytes: 1265
 by: Scott Lurndal - Wed, 10 Jan 2024 14:51 UTC

bart <bc@freeuk.com> writes:

>My original implementation for Windows used these two files only:
>
> bcc.exe (about 1MB)

Why do you think anyone here cares?

Re: Effect of CPP tags

<unmeee$2hvj3$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.network!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: Effect of CPP tags
Date: Wed, 10 Jan 2024 16:51:41 +0100
Organization: A noiseless patient Spider
Lines: 92
Message-ID: <unmeee$2hvj3$1@dont-email.me>
References: <umet9d$3hir9$1@dont-email.me> <unedki$13tlb$1@dont-email.me>
<unegb1$148mk$2@dont-email.me> <ungr21$1hleq$1@dont-email.me>
<unh5p4$1j81h$1@dont-email.me> <unhjme$1ld24$1@dont-email.me>
<uni64g$1nrsb$1@dont-email.me> <unislv$1u3j0$1@dont-email.me>
<unj9l0$1vr6j$1@dont-email.me> <unjmqs$21nsj$1@dont-email.me>
<unk0q8$23dum$1@dont-email.me> <unk4tm$2408t$1@dont-email.me>
<unkblm$2566s$1@dont-email.me> <8734v6p5s1.fsf@nosuchdomain.example.com>
<unke3h$25ia0$1@dont-email.me> <qhjnN.136894$Ama9.92332@fx12.iad>
<unkgvp$25vrm$1@dont-email.me> <unll0n$2e1i8$1@dont-email.me>
<unm1jm$2ft22$1@dont-email.me> <unm5du$2ggel$1@dont-email.me>
<unm9o7$2h6ig$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 10 Jan 2024 15:51:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="58a88cda71ba7fb7026f039432dee052";
logging-data="2686563"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/pkH4Z2nboyFRqwLPmT/SwrKJ3PcSv2G8="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:Acc3TotU71CeA+9Oj5kWXWRrKEk=
Content-Language: en-GB
In-Reply-To: <unm9o7$2h6ig$1@dont-email.me>
 by: David Brown - Wed, 10 Jan 2024 15:51 UTC

On 10/01/2024 15:31, bart wrote:
> On 10/01/2024 13:17, David Brown wrote:
>> On 10/01/2024 13:12, bart wrote:
>
>
>>>>   For example, Microsoft provides everything with their MSVC tools.
>>>> For gcc-based toolchains, GCC writes the compiler but does not
>>>> provide binaries.  The assembler and linker often come from the
>>>> binutils project (which again does not provide binaries), but other
>>>> assemblers and linkers may be used.  Various libraries may be used,
>>>> depending on the target, including glibc, newlib, musl, newlib-nano,
>>>> redlib, avrlib, and many others.  Users can get the parts
>>>> individually, or more often they get packaged toolchains from
>>>> Debian, Redhat, TDM, mingw-64, MS WSL, NXP, TI, Microchip, or many
>>>> others according to their needs.
>>>
>>
>> No one cares.
>
> But you cared enough to list all those complicated ways that some have
> implemented C. It sounded almost lovingly.

I made no comment on what I liked or did not like about it - it was a
factual list. I made it for /your/ benefit.

I don't care about how different C toolchains are made, or by whom, or
whether they are big or small. I care that the ones /I/ need are
obtainable in a suitable manner for /my/ needs, running on /my/ choice
of OS, and for /my/ choice of target. They must be available at an
appropriate cost, and it must be possible to archive them indefinitely
and use them without any awkward "license protect" systems. But it does
not bother me if the package is 1 MB or 1 GB, 1 program or 1000 programs
- those are not relevant concerns for professional programmers.

I do, however, try my best to help people in groups like this. That
includes writing posts to try to help and educate /you/. It gets
increasingly frustrating, however.

> You know, the most remarkable and impressive product for me is the Tiny
> C compiler. It's Small. It's Fast. It's Simple.

It is almost entirely useless, except for the very, very few people who
/need/ a C compiler that is very small. In the days of 3.5" floppy
disks for rescue disks, it was useful. In the days of 16 GB USB flash
devices costing pennies, it is irrelevant.

It is still remarkable, and still impressive - I have no disagreements
there. It will always be an impressive achievement - that will not
change with time. It might also be fun to play with. But it is still
basically useless. It is no longer a particularly useful or needed
tool. Lots of C compilers were once relevant, and now are not, except
perhaps for a few very niche uses.

> Anybody can implement their own ideas of how it should work. There are
> reasons why those people put considerable efforts into those smaller,
> self-contained and more user-friendly products.

"User-friendly" /is/ something worth caring about. So is ease of
installation. Small size, self-contained binaries - those are not of
concern to users. It is absolutely a good thing for many people that a
tool is easy to understand and use - but no one cares what goes on
behind the scenes to make it work, as long as it works fast enough to be
practical on sensible computers. (A half-arsed compiler that implements
some unknown and undocumented subset of C, with random changes at the
whim of the developer, cannot ever be "user-friendly" for anyone other
than said developer.)

To some extent, "user-friendly" will be at odds with flexibility and
features, so there is a balance to be found.

>
> For me a compiler should be as utilitarian and simple to use as a light
> switch.

For me, a compiler should be something found in the real world and not a
deluded fantasy.

>
>> Without the slightest doubt, I can say that if it were possible to
>> build it using /your/ C compiler, and does not use extensions
>> unsupported by gcc, then I could get it to build with gcc without much
>> trouble.
>
> You seem to be acknowledging the benefits of passing a code base through
> a lesser compiler.
>

You seem to be inventing things that I never wrote or implied.

Re: Effect of CPP tags

<unmg7v$2i79j$1@dont-email.me>

  copy mid

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

  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: jameskuy...@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c
Subject: Re: Effect of CPP tags
Date: Wed, 10 Jan 2024 11:22:23 -0500
Organization: A noiseless patient Spider
Lines: 47
Message-ID: <unmg7v$2i79j$1@dont-email.me>
References: <umet9d$3hir9$1@dont-email.me> <unedki$13tlb$1@dont-email.me>
<unegb1$148mk$2@dont-email.me> <ungr21$1hleq$1@dont-email.me>
<unh5p4$1j81h$1@dont-email.me> <unhjme$1ld24$1@dont-email.me>
<uni64g$1nrsb$1@dont-email.me> <unislv$1u3j0$1@dont-email.me>
<unj9l0$1vr6j$1@dont-email.me> <unjmqs$21nsj$1@dont-email.me>
<unk0q8$23dum$1@dont-email.me> <unk4tm$2408t$1@dont-email.me>
<unkblm$2566s$1@dont-email.me> <8734v6p5s1.fsf@nosuchdomain.example.com>
<unke3h$25ia0$1@dont-email.me> <unkhql$25uof$1@dont-email.me>
<unkkp3$26g9o$1@dont-email.me> <87ttnmnjdb.fsf@nosuchdomain.example.com>
<unkp1b$270v8$1@dont-email.me> <87plyanhb8.fsf@nosuchdomain.example.com>
<unktv9$27i0v$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 10 Jan 2024 16:22:23 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="13cf62dd3db703bfa0009c69b9c703c7";
logging-data="2694451"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+e+HaZgMy8AwQuejJlyOViUdBblMlHfOo="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:tXXe/UuYnbXaikdKgGSvks39g9k=
In-Reply-To: <unktv9$27i0v$1@dont-email.me>
Content-Language: en-US
 by: James Kuyper - Wed, 10 Jan 2024 16:22 UTC

Bart <bc@freeuk.cm> writes:
> On 10/01/2024 00:49, Keith Thompson wrote:
....
> I spent some minutes trying to find where this zero-length array
> business originated. It was from you:

No, it originated from the C standard: "... the [ and ] may delimit an
expression ... If the expression is a constant expression, it shall have
a value greater than zero." (6.7.6.2p1).

>>No, it doesn't. C doesn't have zero-length arrays.
>
> You say "C", but don't say which version or which common
> dialect.

This group is not specific to any particular compiler. Therefore, unless
otherwise specified, when I refer to C, I an usually referring to
standard C unless otherwise specified, and more particularly, to the
latest approved version of C, unless otherwise specified. Many other
people follow similar policies. There's very little (if anything) that
can usefully be said about all variants of C - the only meaningful
things you can say are about particular variants.

> ... Apperently the most commonly used dialect is gnu C,

The Gnu C compiler is one of the most widely used, but a lot of people
use it to compile standard C rather than Gnu C - unlike you, most
programmers don't find it particularly difficult to figure out how to
arrange that. I have no idea whether it's more or less popular than
standard C.

> I'm still none the wiser. Can I actually use zero-length arrays? Yes,
> No, Maybe, Only with this or that compiler or that bunch of options.

You can only use zero-length arrays with particular compilers. The ones
that do allow it, generally use options to disable that feature, not to
enable it.

You have two main options:
1. Write separate versions of your code for each compiler you target,
possibly controlled by conditional compilation or makefiles.
2. Choose a particular version of the C standard, and write code that
works with that version. Then, for each target compiler, figure out how
to put it into a mode where it will compile according to that version.
The standard leaves many things unspecified, but it's quite feasible to
write code that has the desired behavior regardless of which choice the
compiler makes for any unspecified behavior.

Re: Effect of CPP tags

<unmhld$16l6$1@news.gegeweb.eu>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.nntp4.net!news.gegeweb.eu!gegeweb.org!.POSTED.2a01:cb19:8674:1100:3054:1e0f:d39d:bfff!not-for-mail
From: tth...@none.invalid (tTh)
Newsgroups: comp.lang.c
Subject: Re: Effect of CPP tags
Date: Wed, 10 Jan 2024 17:46:37 +0100
Organization: none
Message-ID: <unmhld$16l6$1@news.gegeweb.eu>
References: <umet9d$3hir9$1@dont-email.me> <unedki$13tlb$1@dont-email.me>
<unegb1$148mk$2@dont-email.me> <ungr21$1hleq$1@dont-email.me>
<unh5p4$1j81h$1@dont-email.me> <unhjme$1ld24$1@dont-email.me>
<uni64g$1nrsb$1@dont-email.me> <unislv$1u3j0$1@dont-email.me>
<unj9l0$1vr6j$1@dont-email.me> <unjmqs$21nsj$1@dont-email.me>
<unk0q8$23dum$1@dont-email.me> <unk4tm$2408t$1@dont-email.me>
<unkblm$2566s$1@dont-email.me> <8734v6p5s1.fsf@nosuchdomain.example.com>
<unke3h$25ia0$1@dont-email.me> <qhjnN.136894$Ama9.92332@fx12.iad>
<unkgvp$25vrm$1@dont-email.me> <unll0n$2e1i8$1@dont-email.me>
<unm1jm$2ft22$1@dont-email.me> <unm5du$2ggel$1@dont-email.me>
<unm9o7$2h6ig$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 10 Jan 2024 16:46:37 -0000 (UTC)
Injection-Info: news.gegeweb.eu; posting-account="tontonth@usenet.local"; posting-host="2a01:cb19:8674:1100:3054:1e0f:d39d:bfff";
logging-data="39590"; mail-complaints-to="abuse@gegeweb.eu"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha256:n+nCha5lcMq9CdpuRybgp6fqtzybqj+GN702w9AjN48=
In-Reply-To: <unm9o7$2h6ig$1@dont-email.me>
Content-Language: en-US
 by: tTh - Wed, 10 Jan 2024 16:46 UTC

On 1/10/24 15:31, bart wrote:

> What is the minimum number of actual (ie. not ZIP) files needed to
> bundle gcc in the same way? Give me a number. (I guess you don't know; I
> thought you knew your tools inside out!)

$ sudo apt install gcc

--
+---------------------------------------------------------------------+
| https://tube.interhacker.space/a/tth/video-channels |
+---------------------------------------------------------------------+

Re: Effect of CPP tags

<unmlsm$2j67p$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.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: Effect of CPP tags
Date: Wed, 10 Jan 2024 17:58:46 +0000
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <unmlsm$2j67p$1@dont-email.me>
References: <umet9d$3hir9$1@dont-email.me> <unhjme$1ld24$1@dont-email.me>
<uni64g$1nrsb$1@dont-email.me> <unislv$1u3j0$1@dont-email.me>
<unj9l0$1vr6j$1@dont-email.me> <unjmqs$21nsj$1@dont-email.me>
<unk0q8$23dum$1@dont-email.me> <unk4tm$2408t$1@dont-email.me>
<unkblm$2566s$1@dont-email.me> <8734v6p5s1.fsf@nosuchdomain.example.com>
<unke3h$25ia0$1@dont-email.me> <qhjnN.136894$Ama9.92332@fx12.iad>
<unkgvp$25vrm$1@dont-email.me> <unll0n$2e1i8$1@dont-email.me>
<unm1jm$2ft22$1@dont-email.me> <L9ynN.143066$Wp_8.3075@fx17.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 10 Jan 2024 17:58:46 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2b8a13f02598d83e6d39aee6a0dd3487";
logging-data="2726137"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Kj1bUHF8h/Jwf2pH9VqAQNyPPU/avjzc="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:NAer+q2baGABRNKanO6VUvv/VQE=
In-Reply-To: <L9ynN.143066$Wp_8.3075@fx17.iad>
Content-Language: en-GB
 by: bart - Wed, 10 Jan 2024 17:58 UTC

On 10/01/2024 14:51, Scott Lurndal wrote:
> bart <bc@freeuk.com> writes:
>
>> My original implementation for Windows used these two files only:
>>
>> bcc.exe (about 1MB)
>
>
> Why do you think anyone here cares?

Why do you think anyone cares about your makefiles?

It's a counter-example to somebody who might think implementations
really need to be as elaborate as DB was suggesting.

Re: Effect of CPP tags

<unmmnd$2jair$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.swapon.de!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: Effect of CPP tags
Date: Wed, 10 Jan 2024 18:13:01 +0000
Organization: A noiseless patient Spider
Lines: 110
Message-ID: <unmmnd$2jair$1@dont-email.me>
References: <umet9d$3hir9$1@dont-email.me> <unj9l0$1vr6j$1@dont-email.me>
<unjmqs$21nsj$1@dont-email.me> <unk0q8$23dum$1@dont-email.me>
<unk4tm$2408t$1@dont-email.me> <unkblm$2566s$1@dont-email.me>
<8734v6p5s1.fsf@nosuchdomain.example.com> <unke3h$25ia0$1@dont-email.me>
<unkhql$25uof$1@dont-email.me> <unkkp3$26g9o$1@dont-email.me>
<87ttnmnjdb.fsf@nosuchdomain.example.com> <unkp1b$270v8$1@dont-email.me>
<ZSmnN.151217$c3Ea.70659@fx10.iad> <unkuhp$27i0v$2@dont-email.me>
<unlqqa$2eqts$2@dont-email.me> <U7ynN.143065$Wp_8.30410@fx17.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 10 Jan 2024 18:13:01 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2b8a13f02598d83e6d39aee6a0dd3487";
logging-data="2730587"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+tEgn5s8nwZa5ngBB8Gn0HxNIr9wrLmWQ="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:HoZXIzAdltUYvKJeouvrBulpLvI=
Content-Language: en-GB
In-Reply-To: <U7ynN.143065$Wp_8.30410@fx17.iad>
 by: bart - Wed, 10 Jan 2024 18:13 UTC

On 10/01/2024 14:49, Scott Lurndal wrote:
> David Brown <david.brown@hesbynett.no> writes:
>> On 10/01/2024 03:14, Bart wrote:
>>> On 10/01/2024 02:00, Scott Lurndal wrote:
>>>> Bart <bc@freeuk.cm> writes:
>>>>> On 10/01/2024 00:05, Keith Thompson wrote:
>>>>>> Bart <bc@freeuk.cm> writes:
>>>>
>>>>> An easy compiler is one where you just do:
>>>>>
>>>>>     gcc prog
>>>>>
>>>>> and not, at the very least:
>>>>>
>>>>>     gcc prog.c -prog.exe -std=c11 -pedantic-errors
>>>>
>>>>
>>>> $ functions c
>>>> function c
>>>> {
>>>>    gcc -o "$1" -std=c11 -pedantic-errors "$1".c
>>>> }
>>>> $ cat a.c
>>>> #include <stdio.h>
>>>>
>>>> int
>>>> main(int argc, const char **argv, const char **envp)
>>>> {
>>>>
>>>>      printf("Hello World\n");
>>>>
>>>>      return 0;
>>>> }
>>>> $ c a
>>>> $ ./a
>>>> Hello World
>>>>
>>>> Can't get any more concise than that.
>>>
>>> Great. Now tell the gcc people that's what it should do ANYWAY.
>>
>> But it is /not/ what gcc should do.
>>
>> You seem to be mixing up "what Bart wants" with "what countless other
>> people want". Write your own tools to revolve around your own selfish
>> needs if that's your preference, but don't expect everyone else to
>> change their worlds to suit /you/.
>>
>>
>> Scott wrote that as an example that might suit you.
>
>> I am confident that
>> the compiler options he mostly uses are different from that - and that
>> he uses a variety of different options and different times, and that
>> they are different from the options /I/ use or anyone else uses.
>
> Indeed. I use a Makefile and the Makefile.defs include alone has 373
> lines - something sure to piss Bart off. Of course, the project
> has:
>
> SLOC Directory SLOC-by-Language (Sorted)
> 7316068 include ansic=7274603,cpp=41465
> 899374 tests python=763294,ansic=82789,asm=34873,cpp=18013,sh=405
> 885492 io cpp=603113,ansic=281285,python=466,sh=324,asm=304
> 133342 processor cpp=131855,python=1487
> 133153 3rd_party cpp=133033,sh=78,python=42
> 26803 tools python=17834,cpp=4300,sh=1903,ansic=1459,perl=1199,
> ruby=108
> 16754 gen ansic=16754
> 10955 platform cpp=10955
> 8392 common cpp=8392
> 5290 bin cpp=5118,python=172
> 2204 cpc cpp=2204
> 1883 top_dir cpp=1883
> 1430 noc cpp=1430
> 560 shim cpp=560
>
> SLOC doesn't include whitespace or comments.
>
> That's about 10 million lines of code across several hundred source
> and include files.
>
> Yet, the entire application can be built with
>
> $ make

I bet you can't. There's something missing. Unless the implicit file
that make uses happens to be in that '$' directory. Usually you have to
navigate to the project first.

So of the two parts a typical build needs: the program, script or
process that is launched to do the work, and the input needed, one has
already been provided.

A more sensible way would be to require:

make inputfile

Then you could build stuff from anywhere.

BTW well done for discovering that, if a build sequence requires
multiple commands to be executed, you can put those into a 'script' that
requires a single invocation.

Just as long as you realise that this isn't doing away with those
multiple steps, it's hiding them away not simplifying, and adding ONE
MORE step to the process.

The stuff I do is genuine simplification.

Re: Effect of CPP tags

<87edepnich.fsf@nosuchdomain.example.com>

  copy mid

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

  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: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: Effect of CPP tags
Date: Wed, 10 Jan 2024 10:39:26 -0800
Organization: None to speak of
Lines: 47
Message-ID: <87edepnich.fsf@nosuchdomain.example.com>
References: <umet9d$3hir9$1@dont-email.me> <unj9l0$1vr6j$1@dont-email.me>
<unjmqs$21nsj$1@dont-email.me> <unk0q8$23dum$1@dont-email.me>
<unk4tm$2408t$1@dont-email.me> <unkblm$2566s$1@dont-email.me>
<8734v6p5s1.fsf@nosuchdomain.example.com>
<unke3h$25ia0$1@dont-email.me> <unkhql$25uof$1@dont-email.me>
<unkkp3$26g9o$1@dont-email.me>
<87ttnmnjdb.fsf@nosuchdomain.example.com>
<unkp1b$270v8$1@dont-email.me> <ZSmnN.151217$c3Ea.70659@fx10.iad>
<unkuhp$27i0v$2@dont-email.me> <unlqqa$2eqts$2@dont-email.me>
<U7ynN.143065$Wp_8.30410@fx17.iad> <unmmnd$2jair$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="5a0a77619367abc6279fc1e552098ea8";
logging-data="2738998"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/pl3nort+6tF2+PesOkyuu"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:FVwzBAieA3Dg5ZMLC19mT3y/1P8=
sha1:b3uNtfF+bWspsA9oZ6XiFlaMEWM=
 by: Keith Thompson - Wed, 10 Jan 2024 18:39 UTC

bart <bc@freeuk.com> writes:
> On 10/01/2024 14:49, Scott Lurndal wrote:
[...]
>> Yet, the entire application can be built with
>> $ make
>
> I bet you can't. There's something missing. Unless the implicit file
> that make uses happens to be in that '$' directory. Usually you have
> to navigate to the project first.

That '$' is a shell prompt, not a directory.

Yes, you have to "cd" (like "chdir" on Windows) to the project directory
before typing "make". You also have to make sure the computer is
powered on, login, launch a shell, and maybe one or two other things
before you get to that point.

> So of the two parts a typical build needs: the program, script or
> process that is launched to do the work, and the input needed, one has
> already been provided.
>
> A more sensible way would be to require:
>
> make inputfile
>
> Then you could build stuff from anywhere.

Of course "make" fully supports that, though not with your suggested
syntax.

"make -C dir" tells "make" to change to the specified directory before
doing anything else. "make -f filename" tells it to use the specified
file rather than the default "Makefile". "make filename" tells "make"
to *build* "filename", not to read it.

With no arguments, it starts in the current directory, reads rules from
"Makefile", and builds the first target listed in that file.

I've glossed over a minor point about the default makefile name, but
I've already told you more than you'll be willing to learn.

[...]

--
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: Effect of CPP tags

<unmpbl$2joe1$1@dont-email.me>

  copy mid

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

  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: Effect of CPP tags
Date: Wed, 10 Jan 2024 18:57:56 +0000
Organization: A noiseless patient Spider
Lines: 93
Message-ID: <unmpbl$2joe1$1@dont-email.me>
References: <umet9d$3hir9$1@dont-email.me> <unedki$13tlb$1@dont-email.me>
<unegb1$148mk$2@dont-email.me> <ungr21$1hleq$1@dont-email.me>
<unh5p4$1j81h$1@dont-email.me> <unhjme$1ld24$1@dont-email.me>
<uni64g$1nrsb$1@dont-email.me> <unislv$1u3j0$1@dont-email.me>
<unj9l0$1vr6j$1@dont-email.me> <unjmqs$21nsj$1@dont-email.me>
<unk0q8$23dum$1@dont-email.me> <unk4tm$2408t$1@dont-email.me>
<unkblm$2566s$1@dont-email.me> <8734v6p5s1.fsf@nosuchdomain.example.com>
<unke3h$25ia0$1@dont-email.me> <qhjnN.136894$Ama9.92332@fx12.iad>
<unkgvp$25vrm$1@dont-email.me> <unll0n$2e1i8$1@dont-email.me>
<unm1jm$2ft22$1@dont-email.me> <unm5du$2ggel$1@dont-email.me>
<unm9o7$2h6ig$1@dont-email.me> <unmeee$2hvj3$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 10 Jan 2024 18:57:57 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2b8a13f02598d83e6d39aee6a0dd3487";
logging-data="2744769"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/VVm0mzvlA+r12g9cLV7Ks+nnP8qz+zxI="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:M63b167/trGBgz5vU02G97+IyJY=
In-Reply-To: <unmeee$2hvj3$1@dont-email.me>
Content-Language: en-GB
 by: bart - Wed, 10 Jan 2024 18:57 UTC

On 10/01/2024 15:51, David Brown wrote:
> On 10/01/2024 15:31, bart wrote:

> It is almost entirely useless, except for the very, very few people who
> /need/ a C compiler that is very small.  In the days of 3.5" floppy
> disks for rescue disks, it was useful.  In the days of 16 GB USB flash
> devices costing pennies, it is irrelevant.

16 GB can hold a great deal of useful DATA: images, audio and video for
example. It also tends to be consumed sequentially.

But it is a mistake to think it makes it OK have programs, ie. CODE,
that are 0.1GB, 1GB or 10GB in size. Code complexity doesn't scale
linearly as data does.

It means complicated, slow, cumbersome programs, that require extra
power and memory resources. And buggy ones.

> It is still remarkable, and still impressive - I have no disagreements
> there.  It will always be an impressive achievement - that will not
> change with time.  It might also be fun to play with.  But it is still
> basically useless.  It is no longer a particularly useful or needed
> tool.  Lots of C compilers were once relevant, and now are not, except
> perhaps for a few very niche uses.
>
>
>> Anybody can implement their own ideas of how it should work. There are
>> reasons why those people put considerable efforts into those smaller,
>> self-contained and more user-friendly products.
>
> "User-friendly" /is/ something worth caring about.  So is ease of
> installation.  Small size, self-contained binaries - those are not of
> concern to users.

It means I can email you both a source file, and the compiler or
interpreter needed to build or run it (setting aside AV issues). Imagine
supplying gcc or CPython as an email attachment!

Somebody else may be implementing a language with C backend. Rather than
requiring their users to install a C system which will dwarf there own
product, or that is so slow that it would be like hitting a break wall
as soon as they invoke it, a small, fast C compiler could be just
bundled and invoked transparently as there is no disproportionate latency.

> It is absolutely a good thing for many people that a
> tool is easy to understand and use - but no one cares what goes on
> behind the scenes to make it work, as long as it works fast enough to be
> practical on sensible computers.  (A half-arsed compiler that implements
> some unknown and undocumented subset of C, with random changes at the
> whim of the developer, cannot ever be "user-friendly" for anyone other
> than said developer.)

This is what I mean by user-friendly:

c:\c>gcc hello
C:\tdm\bin\ld.exe: cannot find hello: No such file or directory
collect2.exe: error: ld returned 1 exit status

c:\c>gcc hello.c

c:\c>hello
'hello' is not recognized as an internal or external command,
operable program or batch file.

c:\c>gcc hello.c -hello
gcc: error: unrecognized command-line option '-h'

c:\c>gcc hello.c -ohello

c:\c>hello
Hello, World! 00007ff6923d13b4

The above tries to compile hello.c with gcc. The first attempt doesn't
work. The second does, as no error is displayed. But what exactly has it
compiled it to? As there is no file called 'hello.exe.

It needs '-o'. The third attempt has a typo, the fourth finally works.

The user friendly version is this:

c:\c>mcc hello # same input as given to gcc
Compiling hello.c to hello.exe

c:\c>hello
Hello, World! 0000000000401000

The compiler doesn't need the extension. It tells you exactly what it is
doing, incuding where it will write the output.

Please don't talk to me about user-friendly, you don't seem to have a clue.

Re: Effect of CPP tags

<H2CnN.146818$PuZ9.95793@fx11.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx11.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: Effect of CPP tags
Newsgroups: comp.lang.c
References: <umet9d$3hir9$1@dont-email.me> <unislv$1u3j0$1@dont-email.me> <unj9l0$1vr6j$1@dont-email.me> <unjmqs$21nsj$1@dont-email.me> <unk0q8$23dum$1@dont-email.me> <unk4tm$2408t$1@dont-email.me> <unkblm$2566s$1@dont-email.me> <8734v6p5s1.fsf@nosuchdomain.example.com> <unke3h$25ia0$1@dont-email.me> <qhjnN.136894$Ama9.92332@fx12.iad> <unkgvp$25vrm$1@dont-email.me> <unll0n$2e1i8$1@dont-email.me> <unm1jm$2ft22$1@dont-email.me> <L9ynN.143066$Wp_8.3075@fx17.iad> <unmlsm$2j67p$1@dont-email.me>
Lines: 15
Message-ID: <H2CnN.146818$PuZ9.95793@fx11.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Wed, 10 Jan 2024 19:16:55 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Wed, 10 Jan 2024 19:16:55 GMT
X-Received-Bytes: 1405
 by: Scott Lurndal - Wed, 10 Jan 2024 19:16 UTC

bart <bc@freeuk.com> writes:
>On 10/01/2024 14:51, Scott Lurndal wrote:
>> bart <bc@freeuk.com> writes:
>>
>>> My original implementation for Windows used these two files only:
>>>
>>> bcc.exe (about 1MB)
>>
>>
>> Why do you think anyone here cares?
>
>Why do you think anyone cares about your makefiles?

What makes you think I care if anyone cares about my makefiles?

Re: Effect of CPP tags

<20240110111455.765@kylheku.com>

  copy mid

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

  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: 433-929-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: Effect of CPP tags
Date: Wed, 10 Jan 2024 19:23:57 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 46
Message-ID: <20240110111455.765@kylheku.com>
References: <umet9d$3hir9$1@dont-email.me> <un6toq$3ogqm$1@dont-email.me>
<%cFlN.140487$xHn7.115393@fx14.iad> <slrnupeb0t.qme.jj@iridium.wf32df>
<un7cjh$3qi9d$1@dont-email.me> <un7eoj$3qpmp$1@dont-email.me>
<un7ndt$3rr75$1@dont-email.me> <un92c7$6325$1@dont-email.me>
<un9va1$a752$1@dont-email.me> <unb5d3$hum9$2@dont-email.me>
<unb9uk$igst$1@dont-email.me> <87jzomrvh8.fsf@nosuchdomain.example.com>
<uncq37$pvae$1@dont-email.me> <uncqg5$pust$2@dont-email.me>
<87cyuern6k.fsf@nosuchdomain.example.com> <unct09$q65q$4@dont-email.me>
<unedki$13tlb$1@dont-email.me> <unegb1$148mk$2@dont-email.me>
<ungr21$1hleq$1@dont-email.me> <unh5p4$1j81h$1@dont-email.me>
<unhjme$1ld24$1@dont-email.me> <uni64g$1nrsb$1@dont-email.me>
<unislv$1u3j0$1@dont-email.me> <unj9l0$1vr6j$1@dont-email.me>
<unjmqs$21nsj$1@dont-email.me> <unk0q8$23dum$1@dont-email.me>
<unk4tm$2408t$1@dont-email.me> <unkblm$2566s$1@dont-email.me>
<20240109135137.49@kylheku.com> <unlr72$2eqts$3@dont-email.me>
Injection-Date: Wed, 10 Jan 2024 19:23:57 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="888457f3bf002c7964be649d32578c5f";
logging-data="2746874"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX197XzM5pDFB6+NZ2n7uHnD6EohxR1i9S7s="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:ayV5qHR1tGlRjDVw4UpIZ4PaX4o=
 by: Kaz Kylheku - Wed, 10 Jan 2024 19:23 UTC

On 2024-01-10, David Brown <david.brown@hesbynett.no> wrote:
> On 09/01/2024 23:12, Kaz Kylheku wrote:
>> On 2024-01-09, Bart <bc@freeuk.cm> wrote:
>
>
>>> Don't tell me: gcc has some option to warn of using octal literals. So
>>> your 'successful' language relies on extensive extra tools (all the
>>> stuff in that support truck) to keep it useable.
>>
>> Unfortunately, it is a cynical observation that languages that don't
>> require tools tend not to attract people.
>
> A less cynical observation would suggest that a successful language is
> one that is used a lot, and therefore attracts additional tools that
> make its use better.

Also, there is no language for which the implementations have the final
word on any program, such that the users cannot imagine needing new
kinds of diagnostics.

What is a diagnostic? It's something which evaluate a
truth-valued proposition about a program, and reports if it
is true.

A program has a large number of properties about which true propositions
can be stated. Any of those truths could potentially be a useful
diagnostic to someone.

It is not realistic to expect that a language specification can state
all the propositions that may be diagnosed, such that no others may be
diagnosed.

Furthermore, users may want to be informed about certain programs which
are correct by the language, but which have some undesirable property,
specific to their requirements, such as a local coding standard or
even application-specific requirements.

E.g. a C program which puts sensitive info into an improperly procured
temporary file might be correct by ISO C, but we can imagine a
sophisticated diagnostic identifying the situation.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
NOTE: If you use Google Groups, I don't see you, unless you're whitelisted.

Re: Effect of CPP tags

<unmqsg$2jvva$1@dont-email.me>

  copy mid

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

  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: Effect of CPP tags
Date: Wed, 10 Jan 2024 19:24:00 +0000
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <unmqsg$2jvva$1@dont-email.me>
References: <umet9d$3hir9$1@dont-email.me> <unj9l0$1vr6j$1@dont-email.me>
<unjmqs$21nsj$1@dont-email.me> <unk0q8$23dum$1@dont-email.me>
<unk4tm$2408t$1@dont-email.me> <unkblm$2566s$1@dont-email.me>
<8734v6p5s1.fsf@nosuchdomain.example.com> <unke3h$25ia0$1@dont-email.me>
<unkhql$25uof$1@dont-email.me> <unkkp3$26g9o$1@dont-email.me>
<87ttnmnjdb.fsf@nosuchdomain.example.com> <unkp1b$270v8$1@dont-email.me>
<ZSmnN.151217$c3Ea.70659@fx10.iad> <unkuhp$27i0v$2@dont-email.me>
<unlqqa$2eqts$2@dont-email.me> <U7ynN.143065$Wp_8.30410@fx17.iad>
<unmmnd$2jair$1@dont-email.me> <87edepnich.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 10 Jan 2024 19:24:00 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2b8a13f02598d83e6d39aee6a0dd3487";
logging-data="2752490"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+/NjNyMc2+FINm0bHm+0iFGswe9sc4qYM="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:WBm595KG+FJWIvpBc3B/WR/qWmo=
Content-Language: en-GB
In-Reply-To: <87edepnich.fsf@nosuchdomain.example.com>
 by: bart - Wed, 10 Jan 2024 19:24 UTC

On 10/01/2024 18:39, Keith Thompson wrote:
> bart <bc@freeuk.com> writes:
>> On 10/01/2024 14:49, Scott Lurndal wrote:
> [...]
>>> Yet, the entire application can be built with
>>> $ make
>>
>> I bet you can't. There's something missing. Unless the implicit file
>> that make uses happens to be in that '$' directory. Usually you have
>> to navigate to the project first.
>
> That '$' is a shell prompt, not a directory.
>
> Yes, you have to "cd" (like "chdir" on Windows) to the project directory
> before typing "make". You also have to make sure the computer is
> powered on, login, launch a shell, and maybe one or two other things
> before you get to that point.

You're missing the point. SL is making a big deal about the fact that
you can type 'make' without providing any apparent input. But that input
is provided when you use 'cd' to get the relevant folder.

Or do you think that the 'make' command provided will build that
specific project irrespective of the CWD?

Re: Effect of CPP tags

<unmr3f$2k0bj$1@dont-email.me>

  copy mid

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

  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: Effect of CPP tags
Date: Wed, 10 Jan 2024 20:27:43 +0100
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <unmr3f$2k0bj$1@dont-email.me>
References: <umet9d$3hir9$1@dont-email.me> <unhjme$1ld24$1@dont-email.me>
<uni64g$1nrsb$1@dont-email.me> <unislv$1u3j0$1@dont-email.me>
<unj9l0$1vr6j$1@dont-email.me> <unjmqs$21nsj$1@dont-email.me>
<unk0q8$23dum$1@dont-email.me> <unk4tm$2408t$1@dont-email.me>
<unkblm$2566s$1@dont-email.me> <8734v6p5s1.fsf@nosuchdomain.example.com>
<unke3h$25ia0$1@dont-email.me> <qhjnN.136894$Ama9.92332@fx12.iad>
<unkgvp$25vrm$1@dont-email.me> <unll0n$2e1i8$1@dont-email.me>
<unm1jm$2ft22$1@dont-email.me> <L9ynN.143066$Wp_8.3075@fx17.iad>
<unmlsm$2j67p$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 10 Jan 2024 19:27:43 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="761c506d41389384fa71c6f222bc6474";
logging-data="2752883"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ele4xgMPCc05H8vmAdmouRKNfGIPqimg="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:3L4m+x0256CX4kW1ihJPci0cifM=
In-Reply-To: <unmlsm$2j67p$1@dont-email.me>
Content-Language: en-GB
 by: David Brown - Wed, 10 Jan 2024 19:27 UTC

On 10/01/2024 18:58, bart wrote:
> On 10/01/2024 14:51, Scott Lurndal wrote:
>> bart <bc@freeuk.com> writes:
>>
>>> My original implementation for Windows used these two files only:
>>>
>>>     bcc.exe           (about 1MB)
>>
>>
>> Why do you think anyone here cares?
>
> Why do you think anyone cares about your makefiles?
>

Scott was trying to help you (and if you had done him the courtesy of
reading his post, you'd see it was not using make).

> It's a counter-example to somebody who might think implementations
> really need to be as elaborate as DB was suggesting.
>

Again, you are making stuff up. I never suggested C implementations
need to be elaborate. I said they could be elaborate, or not, but that
no one really cares about sizes or numbers of files. (I agree that some
people care about being complicated to use. gcc is only complicated if
you choose to use a lot of options - very few are needed, and most
people capable of programming in C can google for their gcc option needs
in a few minutes at most.)

Re: Effect of CPP tags

<87a5pdnfkp.fsf@nosuchdomain.example.com>

  copy mid

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

  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: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: Effect of CPP tags
Date: Wed, 10 Jan 2024 11:39:18 -0800
Organization: None to speak of
Lines: 44
Message-ID: <87a5pdnfkp.fsf@nosuchdomain.example.com>
References: <umet9d$3hir9$1@dont-email.me> <unj9l0$1vr6j$1@dont-email.me>
<unjmqs$21nsj$1@dont-email.me> <unk0q8$23dum$1@dont-email.me>
<unk4tm$2408t$1@dont-email.me> <unkblm$2566s$1@dont-email.me>
<8734v6p5s1.fsf@nosuchdomain.example.com>
<unke3h$25ia0$1@dont-email.me> <unkhql$25uof$1@dont-email.me>
<unkkp3$26g9o$1@dont-email.me>
<87ttnmnjdb.fsf@nosuchdomain.example.com>
<unkp1b$270v8$1@dont-email.me> <ZSmnN.151217$c3Ea.70659@fx10.iad>
<unkuhp$27i0v$2@dont-email.me> <unlqqa$2eqts$2@dont-email.me>
<U7ynN.143065$Wp_8.30410@fx17.iad> <unmmnd$2jair$1@dont-email.me>
<87edepnich.fsf@nosuchdomain.example.com>
<unmqsg$2jvva$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="5a0a77619367abc6279fc1e552098ea8";
logging-data="2756156"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/OTzXHoTEO1bFaEGUuC2k3"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:q1v54nET3E5DRWg4fPH+nDT60NU=
sha1:FMeroA8wU7SVLHmWurTK+wRwI0Y=
 by: Keith Thompson - Wed, 10 Jan 2024 19:39 UTC

bart <bc@freeuk.com> writes:
> On 10/01/2024 18:39, Keith Thompson wrote:
>> bart <bc@freeuk.com> writes:
>>> On 10/01/2024 14:49, Scott Lurndal wrote:
>> [...]
>>>> Yet, the entire application can be built with
>>>> $ make
>>>
>>> I bet you can't. There's something missing. Unless the implicit file
>>> that make uses happens to be in that '$' directory. Usually you have
>>> to navigate to the project first.
>> That '$' is a shell prompt, not a directory.
>> Yes, you have to "cd" (like "chdir" on Windows) to the project
>> directory
>> before typing "make". You also have to make sure the computer is
>> powered on, login, launch a shell, and maybe one or two other things
>> before you get to that point.
>
> You're missing the point.

No.

> SL is making a big deal about the fact that
> you can type 'make' without providing any apparent input.

Meh. The "make" command has sensible defaults -- at least a lot of us
find them sensible. You complain about having to provide options. He
showed you a case where you don't, once things are set up.

> But that
> input is provided when you use 'cd' to get the relevant folder.

Of course. I'm certain that Scott is aware of that and wasn't trying to
hide anything.

> Or do you think that the 'make' command provided will build that
> specific project irrespective of the CWD?

Of course not.

--
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: Effect of CPP tags

<unmrvs$2k3ol$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.neodome.net!news.mixmin.net!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: Effect of CPP tags
Date: Wed, 10 Jan 2024 20:42:52 +0100
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <unmrvs$2k3ol$1@dont-email.me>
References: <umet9d$3hir9$1@dont-email.me> <unj9l0$1vr6j$1@dont-email.me>
<unjmqs$21nsj$1@dont-email.me> <unk0q8$23dum$1@dont-email.me>
<unk4tm$2408t$1@dont-email.me> <unkblm$2566s$1@dont-email.me>
<8734v6p5s1.fsf@nosuchdomain.example.com> <unke3h$25ia0$1@dont-email.me>
<unkhql$25uof$1@dont-email.me> <unkkp3$26g9o$1@dont-email.me>
<87ttnmnjdb.fsf@nosuchdomain.example.com> <unkp1b$270v8$1@dont-email.me>
<ZSmnN.151217$c3Ea.70659@fx10.iad> <unkuhp$27i0v$2@dont-email.me>
<unlqqa$2eqts$2@dont-email.me> <U7ynN.143065$Wp_8.30410@fx17.iad>
<unmmnd$2jair$1@dont-email.me> <87edepnich.fsf@nosuchdomain.example.com>
<unmqsg$2jvva$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 10 Jan 2024 19:42:52 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="761c506d41389384fa71c6f222bc6474";
logging-data="2756373"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+sqK8r6ifpjMD95Aebqe4ukLnDNZH1iCM="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:ymJq/biPUU49kt3UVJi4wNydrbY=
Content-Language: en-GB
In-Reply-To: <unmqsg$2jvva$1@dont-email.me>
 by: David Brown - Wed, 10 Jan 2024 19:42 UTC

On 10/01/2024 20:24, bart wrote:
> On 10/01/2024 18:39, Keith Thompson wrote:
>> bart <bc@freeuk.com> writes:
>>> On 10/01/2024 14:49, Scott Lurndal wrote:
>> [...]
>>>> Yet, the entire application can be built with
>>>> $ make
>>>
>>> I bet you can't. There's something missing. Unless the implicit file
>>> that make uses happens to be in that '$' directory. Usually you have
>>> to navigate to the project first.
>>
>> That '$' is a shell prompt, not a directory.
>>
>> Yes, you have to "cd" (like "chdir" on Windows) to the project directory
>> before typing "make".  You also have to make sure the computer is
>> powered on, login, launch a shell, and maybe one or two other things
>> before you get to that point.
>
> You're missing the point. SL is making a big deal about the fact that
> you can type 'make' without providing any apparent input. But that input
> is provided when you use 'cd' to get the relevant folder.
>
> Or do you think that the 'make' command provided will build that
> specific project irrespective of the CWD?

The input is the makefile, and all the source files. Did you think
Scott was claiming that just typing "make" somewhere on any Linux
machine would build his vast project, without having the makefile(s) or
source files available or being in the right directory?

And are you still so ignorant about "make" that you think it is
equivalent to a script?

Re: Effect of CPP tags

<unms6r$2k3ol$2@dont-email.me>

  copy mid

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

  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: Effect of CPP tags
Date: Wed, 10 Jan 2024 20:46:35 +0100
Organization: A noiseless patient Spider
Lines: 54
Message-ID: <unms6r$2k3ol$2@dont-email.me>
References: <umet9d$3hir9$1@dont-email.me> <%cFlN.140487$xHn7.115393@fx14.iad>
<slrnupeb0t.qme.jj@iridium.wf32df> <un7cjh$3qi9d$1@dont-email.me>
<un7eoj$3qpmp$1@dont-email.me> <un7ndt$3rr75$1@dont-email.me>
<un92c7$6325$1@dont-email.me> <un9va1$a752$1@dont-email.me>
<unb5d3$hum9$2@dont-email.me> <unb9uk$igst$1@dont-email.me>
<87jzomrvh8.fsf@nosuchdomain.example.com> <uncq37$pvae$1@dont-email.me>
<uncqg5$pust$2@dont-email.me> <87cyuern6k.fsf@nosuchdomain.example.com>
<unct09$q65q$4@dont-email.me> <unedki$13tlb$1@dont-email.me>
<unegb1$148mk$2@dont-email.me> <ungr21$1hleq$1@dont-email.me>
<unh5p4$1j81h$1@dont-email.me> <unhjme$1ld24$1@dont-email.me>
<uni64g$1nrsb$1@dont-email.me> <unislv$1u3j0$1@dont-email.me>
<unj9l0$1vr6j$1@dont-email.me> <unjmqs$21nsj$1@dont-email.me>
<unk0q8$23dum$1@dont-email.me> <unk4tm$2408t$1@dont-email.me>
<unkblm$2566s$1@dont-email.me> <20240109135137.49@kylheku.com>
<unlr72$2eqts$3@dont-email.me> <20240110111455.765@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 10 Jan 2024 19:46:35 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="761c506d41389384fa71c6f222bc6474";
logging-data="2756373"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18AS85w+/bsKByO5cFMlOUbbrQKZr87j+U="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:0X8gdLR7fKmnwdBlqySNYdPyhpg=
Content-Language: en-GB
In-Reply-To: <20240110111455.765@kylheku.com>
 by: David Brown - Wed, 10 Jan 2024 19:46 UTC

On 10/01/2024 20:23, Kaz Kylheku wrote:
> On 2024-01-10, David Brown <david.brown@hesbynett.no> wrote:
>> On 09/01/2024 23:12, Kaz Kylheku wrote:
>>> On 2024-01-09, Bart <bc@freeuk.cm> wrote:
>>
>>
>>>> Don't tell me: gcc has some option to warn of using octal literals. So
>>>> your 'successful' language relies on extensive extra tools (all the
>>>> stuff in that support truck) to keep it useable.
>>>
>>> Unfortunately, it is a cynical observation that languages that don't
>>> require tools tend not to attract people.
>>
>> A less cynical observation would suggest that a successful language is
>> one that is used a lot, and therefore attracts additional tools that
>> make its use better.
>
> Also, there is no language for which the implementations have the final
> word on any program, such that the users cannot imagine needing new
> kinds of diagnostics.
>
> What is a diagnostic? It's something which evaluate a
> truth-valued proposition about a program, and reports if it
> is true.
>
> A program has a large number of properties about which true propositions
> can be stated. Any of those truths could potentially be a useful
> diagnostic to someone.
>
> It is not realistic to expect that a language specification can state
> all the propositions that may be diagnosed, such that no others may be
> diagnosed.
>
> Furthermore, users may want to be informed about certain programs which
> are correct by the language, but which have some undesirable property,
> specific to their requirements, such as a local coding standard or
> even application-specific requirements.
>
> E.g. a C program which puts sensitive info into an improperly procured
> temporary file might be correct by ISO C, but we can imagine a
> sophisticated diagnostic identifying the situation.
>

Agreed (on all points).

People have wildly different requirements. The gcc flags I want for my
builds would be entirely unsuitable for the builds you do, and vice
versa. Bart's idea that we can all use a single simple command is
because he lives in a tiny little bubble with himself at the centre, and
other people's needs or wants are so irrelevant to him that he doesn't
even see that they exist. As far as Bart's concerned, it's easier to
change his language and compiler than to use a flag when invoking a tool.


devel / comp.lang.c / Effect of CPP tags

Pages:123456789101112131415161718192021222324252627
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor