On Tue, 2 Aug 2022 14:06:45 -0500
"G. Branden Robinson" wrote:
> (the "root of all evil" thing), which also got stuffed into
> Donald Knuth's mouth
Knuth did say it. Please see " Structured Programming with go to
Statements" mentioned in "ACM Computing Surveys Vol. 6, No. 4" at
htt
Hi Doug,
On 7/27/22 15:23, Douglas McIlroy wrote:
I agree with all of Ingo's comments. A man page is a reference, not a
history, not a tutorial, not a style guide, There s nothing to say
about NULL beyond it's being a synonym for the constant 0 converted to
the null pointer. Other facts about th
Hi Branden,
On 8/3/22 17:58, G. Branden Robinson wrote:
At 2022-08-03T01:54:18+0200, Alejandro Colomar wrote:
Could you show an example? I'm curious.
Sure. Let me quote Andrew Koenig, _C Traps and Pitfalls_,
Addison-Wesley, 1989.
"I once talked to someone who was writing a C program to ru
Hi Alex,
I'll reply to one bit of this for now and the rest later. I need to eat
my vegetables (fix that groff man(7) `CHECKSTYLE` warning)--I've got it
down to 2 test case failures. At least four of my tests were adequately
irascible to find real problems!
At 2022-08-03T01:54:18+0200, Alejandr
Hi Branden,
On 8/2/22 21:06, G. Branden Robinson wrote:
[content warning: yet another long software engineering rant]
[this one took me many hours to read completely, including links, but
was funny]
At 2022-08-02T13:38:22+0200, Alejandro Colomar wrote:
On 7/27/22 15:23, Douglas McIlroy w
[content warning: yet another long software engineering rant]
At 2022-08-02T13:38:22+0200, Alejandro Colomar wrote:
> On 7/27/22 15:23, Douglas McIlroy wrote:
> >
> > Incidentally, I personally don't use NULL. Why, when C provides a
> > crisp notation, 0, should one want to haul in an extra inclu
Hi Doug,
On 7/27/22 15:23, Douglas McIlroy wrote:
Incidentally, I personally don't use NULL. Why, when C provides a
crisp notation, 0, should one want to haul in an extra include file to
activate a shouty version of it?
Because I don't know what foo(a, b, 0, 0) is, and I don't know from
mem
Hi Ingo,
On 7/27/22 15:11, Alejandro Colomar wrote:
+.SH CONFORMING TO
That should be ".SH STANDARDS".
We use CONFORMING TO in Linux. Don't know why; just history, I guess.
See man-pages(7).
Weird.
I failed to find a single instance of "CONFORMING TO" in AT&T UNIX
(including v6, PWB, v
I agree with all of Ingo's comments. A man page is a reference, not a
history, not a tutorial, not a style guide, There s nothing to say
about NULL beyond it's being a synonym for the constant 0 converted to
the null pointer. Other facts about the behavior of null pointers will
have been learned ho
Hi Ingo,
On 7/27/22 12:49, Ingo Schwarze wrote:
Hi Alejandro,
Alejandro Colomar wrote on Tue, Jul 26, 2022 at 02:02:56PM +0200:
On 7/25/22 20:49, Ingo Schwarze wrote:
Alejandro Colomar wrote on Sun, Jul 24, 2022 at 09:19:32PM +0200:
+.B 0
There is really no need to mark up integer const
Hi Alejandro,
Alejandro Colomar wrote on Tue, Jul 26, 2022 at 02:02:56PM +0200:
> On 7/25/22 20:49, Ingo Schwarze wrote:
>> Alejandro Colomar wrote on Sun, Jul 24, 2022 at 09:19:32PM +0200:
>>> +.B 0
>> There is really no need to mark up integer constants.
> groff_man_style(7):
>
Hi Ralph,
On 7/26/22 14:25, Ralph Corderoy wrote:
Its long been the case that straying into undefined behaviour allows a
compiler to optimise away what is stated above as ‘almost certain’,
i.e. SIGSEGV.
http://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html
Dereferenc
Hi Jakub,
On 7/25/22 20:57, Jakub Wilk wrote:
* Alejandro Colomar , 2022-07-24, 21:19:
+.B "#define NULL ((void *) 0)"
+.fi
+.SH DESCRIPTION
+.B NULL
+represents a null pointer constant.
+.PP
+According to POSIX,
+it shall expand to an integer constant expression with the value
+.B 0
+cast to
Hi Alex and Ingo,
Alex wrote:
> > > +It is undefined behavior to dereference a null pointer
> >
> > That is formally true, but hardly helpful in a manual page because
> > what happens when you dereference a NULL pointer is faily
> > predictable in practice: a segmentation fault.
> >
> > Any othe
Hi Ingo,
On 7/25/22 20:49, Ingo Schwarze wrote:
Hi Alejandro,
Alejandro Colomar wrote on Sun, Jul 24, 2022 at 09:19:32PM +0200:
- Move to man3const [Ralph, Branden]
- Added LIBRARY section
- Added #include [Ralph]
- Note that it can also be used as a function pointer [Ralph]
- Document that 0
* Alejandro Colomar , 2022-07-24, 21:19:
+.B "#define NULL ((void *) 0)"
+.fi
+.SH DESCRIPTION
+.B NULL
+represents a null pointer constant.
+.PP
+According to POSIX,
+it shall expand to an integer constant expression with the value
+.B 0
+cast to type
+.IR "void *" .
Might be worth noting tha
Hi Alejandro,
Alejandro Colomar wrote on Sun, Jul 24, 2022 at 09:19:32PM +0200:
> - Move to man3const [Ralph, Branden]
> - Added LIBRARY section
> - Added #include [Ralph]
> - Note that it can also be used as a function pointer [Ralph]
> - Document that 0 is another null pointer constant [Ralph]
Reported-by: "G. Branden Robinson"
Cc: Ralph Corderoy
Cc: Ingo Schwarze
Signed-off-by: Alejandro Colomar
---
v2:
- Move to man3const [Ralph, Branden]
- Added LIBRARY section
- Added #include [Ralph]
- Note that it can also be used as a function pointer [Ralph]
- Document that 0 is another nu
18 matches
Mail list logo