Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #89160 > unrolled thread
| Started by | Muttley@dastardlyhq.com |
|---|---|
| First post | 2023-02-20 16:45 +0000 |
| Last post | 2023-02-21 08:15 -0800 |
| Articles | 20 on this page of 203 — 22 participants |
Back to article view | Back to comp.lang.c++
Is this safe? Muttley@dastardlyhq.com - 2023-02-20 16:45 +0000
Re: Is this safe? Bonita Montero <Bonita.Montero@gmail.com> - 2023-02-20 18:34 +0100
Re: Is this safe? Chris Vine <vine24683579@gmail.com> - 2023-02-20 11:16 -0800
Re: Is this safe? Bonita Montero <Bonita.Montero@gmail.com> - 2023-02-20 21:39 +0100
Re: Is this safe? Chris Vine <vine24683579@gmail.com> - 2023-02-20 12:56 -0800
Re: Is this safe? Tony Oliver <guinness.tony@gmail.com> - 2023-02-20 16:17 -0800
Re: Is this safe? Manu Raju <MR@invalid.invalid> - 2023-02-21 01:57 +0000
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-21 09:15 +0000
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-21 12:31 +0200
Re: Is this safe? Bonita Montero <Bonita.Montero@gmail.com> - 2023-02-21 05:36 +0100
Re: Is this safe? Chris Vine <vine24683579@gmail.com> - 2023-02-21 02:19 -0800
Re: Is this safe? Bonita Montero <Bonita.Montero@gmail.com> - 2023-02-21 14:16 +0100
Re: Is this safe? Ralf Goertz <me@myprovider.invalid> - 2023-02-21 14:40 +0100
Re: Is this safe? Chris Vine <vine24683579@gmail.com> - 2023-02-21 05:51 -0800
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-21 15:58 +0200
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-21 14:55 +0000
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-21 19:02 +0200
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-21 17:13 +0000
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-21 19:58 +0200
Re: Is this safe? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-02-21 12:15 -0800
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-21 23:41 +0200
Re: Is this safe? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-03-03 12:57 -0800
Re: Is this safe? Tony Oliver <guinness.tony@gmail.com> - 2023-02-20 16:14 -0800
Re: Is this safe? James Kuyper <jameskuyper@alumni.caltech.edu> - 2023-02-20 23:48 -0500
Re: Is this safe? Öö Tiib <ootiib@hot.ee> - 2023-02-21 00:05 -0800
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-21 09:14 +0000
Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-20 21:18 -0500
Re: Is this safe? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2023-02-20 20:38 -0800
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-21 09:18 +0000
Re: Is this safe? "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-02-21 15:12 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-21 14:53 +0000
Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-21 10:35 -0800
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-22 09:25 +0000
Re: Is this safe? "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-02-22 22:33 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 09:25 +0000
Re: Is this safe? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2023-02-23 07:05 -0800
Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-22 21:21 -0800
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-23 09:39 +0200
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 09:35 +0000
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-23 12:30 +0200
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 10:34 +0000
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-23 13:20 +0200
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 16:00 +0000
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-23 18:24 +0200
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 16:28 +0000
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-23 19:01 +0200
Re: Is this safe? James Kuyper <jameskuyper@alumni.caltech.edu> - 2023-02-23 11:57 -0500
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-23 19:12 +0200
Re: Is this safe? James Kuyper <jameskuyper@alumni.caltech.edu> - 2023-02-23 11:57 -0500
Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-23 12:20 -0500
Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-02-24 02:15 +0000
Re: Is this safe? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-02-24 15:24 -0800
Re: Is this safe? James Kuyper <jameskuyper@alumni.caltech.edu> - 2023-02-24 02:14 -0500
Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-23 07:18 -0500
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 16:01 +0000
Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-23 11:50 -0500
Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-23 14:41 -0800
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-23 19:44 +0100
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-23 15:02 +0100
Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-02-23 14:49 +0000
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-23 16:25 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 16:10 +0000
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-23 20:46 +0100
Re: Is this safe? scott@slp53.sl.home (Scott Lurndal) - 2023-02-23 20:05 +0000
Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-23 14:48 -0800
Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-23 22:12 -0500
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-24 10:49 +0200
Re: Is this safe? Ralf Fassel <ralfixx@gmx.de> - 2023-02-24 11:36 +0100
Re: Is this safe? scott@slp53.sl.home (Scott Lurndal) - 2023-02-24 15:39 +0000
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-24 10:29 +0000
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-24 17:20 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-24 17:09 +0000
Re: Is this safe? scott@slp53.sl.home (Scott Lurndal) - 2023-02-24 17:32 +0000
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-25 11:56 +0000
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-25 16:04 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-25 15:47 +0000
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-25 19:13 +0100
Re: Is this safe? scott@slp53.sl.home (Scott Lurndal) - 2023-02-25 19:00 +0000
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-27 08:43 +0000
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-27 10:31 +0100
Re: Is this safe? scott@slp53.sl.home (Scott Lurndal) - 2023-02-25 16:40 +0000
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-24 18:42 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-25 11:58 +0000
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-25 16:25 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-25 15:45 +0000
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-25 19:15 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-27 08:44 +0000
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-27 10:40 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-27 10:24 +0000
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-27 18:31 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-28 08:38 +0000
Re: Is this safe? Öö Tiib <ootiib@hot.ee> - 2023-02-28 01:33 -0800
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-28 10:17 +0000
Re: Is this safe? Öö Tiib <ootiib@hot.ee> - 2023-02-28 02:43 -0800
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-28 16:50 +0100
Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-02-28 03:19 -0800
Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-28 08:10 -0500
Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-02-28 05:42 -0800
Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-28 09:39 -0500
Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-02-28 07:12 -0800
Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-28 11:29 -0500
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-28 16:45 +0100
Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-02-28 11:31 -0800
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-28 20:59 +0100
Re: Is this safe? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-03-01 14:29 -0800
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-28 16:37 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-28 15:56 +0000
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-28 18:34 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-03-01 09:37 +0000
Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-03-01 02:29 -0800
Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-03-01 19:56 +0000
Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-03-01 12:53 -0800
Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-03-01 21:13 +0000
Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-03-02 01:48 -0800
Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-03-03 21:44 +0000
Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-03-03 20:16 -0800
Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-03-04 22:55 +0000
Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-03-05 07:11 -0800
Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-03-05 20:44 +0000
Re: Is this safe? Mr Flibble <flibble2@reddwarf.jmc.corp> - 2023-03-05 21:00 +0000
Re: Is this safe? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-03-05 13:59 -0800
Re: Is this safe? Mr Flibble <flibble2@reddwarf.jmc.corp> - 2023-03-05 23:07 +0000
Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-03-06 00:22 +0000
Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-03-05 14:26 -0800
Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-03-06 00:51 +0000
Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-03-06 02:17 -0800
Re: Is this safe? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-03-05 08:13 -0800
Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-03-05 09:05 -0800
Re: Is this safe? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-03-14 09:47 -0700
Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-03-01 14:40 -0800
Re: Is this safe? Muttley@dastardlyhq.com - 2023-03-02 09:07 +0000
Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-03-01 21:37 -0500
Re: Is this safe? Öö Tiib <ootiib@hot.ee> - 2023-03-01 22:30 -0800
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-03-01 14:27 +0100
Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-03-01 10:48 -0800
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-03-02 10:29 +0100
Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-03-01 19:53 +0000
Re: Is this safe? Muttley@dastardlyhq.com - 2023-03-02 09:08 +0000
Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-03-02 01:32 -0800
Re: Is this safe? Muttley@dastardlyhq.com - 2023-03-02 09:56 +0000
Re: Is this safe? Öö Tiib <ootiib@hot.ee> - 2023-03-02 04:02 -0800
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-03-02 15:00 +0100
Re: Is this safe? Öö Tiib <ootiib@hot.ee> - 2023-03-02 07:59 -0800
Re: Is this safe? Muttley@dastardlyhq.com - 2023-03-02 15:38 +0000
Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-03-02 11:16 -0800
Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-03-02 11:08 -0800
Re: Is this safe? Muttley@dastardlyhq.com - 2023-03-03 09:53 +0000
Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-03-04 06:47 -0800
Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-03-02 19:35 +0000
Re: Is this safe? "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-02-28 17:40 +0100
Re: Is this safe? James Kuyper <jameskuyper@alumni.caltech.edu> - 2023-02-24 12:16 -0500
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-24 18:39 +0100
Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-24 10:03 -0800
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-24 19:59 +0100
Re: Is this safe? "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-02-25 06:47 +0100
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-25 10:23 +0200
Re: Is this safe? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2023-02-23 07:16 -0800
Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-23 14:31 -0800
Re: Is this safe? "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-02-23 16:34 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 16:15 +0000
Re: Is this safe? "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-02-24 12:17 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-24 12:24 +0000
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-24 15:18 +0200
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-24 15:55 +0000
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-24 18:20 +0200
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-24 17:05 +0000
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-24 19:24 +0200
Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-24 09:46 -0800
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-24 17:30 +0100
Re: Is this safe? scott@slp53.sl.home (Scott Lurndal) - 2023-02-23 17:12 +0000
Re: Is this safe? Öö Tiib <ootiib@hot.ee> - 2023-02-23 02:47 -0800
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 15:59 +0000
Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-23 11:55 -0500
Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-23 08:37 -0800
Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-23 14:19 -0800
Re: Is this safe? scott@slp53.sl.home (Scott Lurndal) - 2023-02-23 17:09 +0000
Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-23 12:21 -0500
Re: Is this safe? scott@slp53.sl.home (Scott Lurndal) - 2023-02-23 17:55 +0000
Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-23 13:57 -0800
Re: Is this safe? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2023-02-23 17:28 -0800
Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-23 21:44 -0800
Re: Is this safe? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-02-24 08:48 -0800
Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-21 10:58 -0800
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-22 09:26 +0000
Re: Is this safe? "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-02-22 22:34 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 09:29 +0000
Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-23 08:28 -0800
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 17:16 +0000
Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-23 22:24 -0800
Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-22 21:30 -0800
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 09:31 +0000
Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-23 22:00 -0800
Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-23 22:20 -0800
Re: Is this safe? James Kuyper <jameskuyper@alumni.caltech.edu> - 2023-02-24 01:34 -0500
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-24 10:32 +0000
Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-25 00:19 -0800
Re: Is this safe? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2023-02-22 08:09 -0800
Re: Is this safe? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2023-02-21 22:32 -0800
Re: Is this safe? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-02-22 08:32 -0800
Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-22 09:17 -0800
Re: Is this safe? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-04-04 23:28 -0700
Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-04-05 11:08 -0700
Re: Is this safe? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2023-02-21 08:15 -0800
Page 4 of 11 — ← Prev page 1 2 3 [4] 5 6 … 11 Next page →
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2023-02-23 16:25 +0100 |
| Message-ID | <tt80hs$1tb6l$1@dont-email.me> |
| In reply to | #89227 |
On 23/02/2023 15:49, Ben Bacarisse wrote: > David Brown <david.brown@hesbynett.no> writes: > >> On 23/02/2023 11:34, Muttley@dastardlyhq.com wrote: >>> On Thu, 23 Feb 2023 12:30:39 +0200 >>> Paavo Helde <eesnimi@osa.pri.ee> wrote: >>>> 23.02.2023 11:35 Muttley@dastardlyhq.com kirjutas: >>>>> On Thu, 23 Feb 2023 09:39:04 +0200 >>>>> Paavo Helde <eesnimi@osa.pri.ee> wrote: >>>>>> 22.02.2023 11:25 Muttley@dastardlyhq.com kirjutas: >>>>>> >>>>>>> Absolute rubbish. Why would UTF8 have anything to do with "safety"? Safety >>>>>>> means will the program crash or have hidden bugs, not whether a string gets >>>> >>>>>>> translated into uppercase properly or not which would be immediately >>>> obvious. >>>>>> >>>>>> >>>>>> >>>>>> Because you asked: I have seen isdigit() crashing hard on negative >>>>> >>>>> Thats clearly a library bug. All bets are off when they exist. >>>> >>>> What makes you think so? The C standard clearly says in 7.4 (Character >>>> handling <ctype.h>): >>>> >>>> "In all cases the argument is an int, the value of which shall be >>>> representable as an unsigned char or shall equal the value of the macro >>>> EOF. If the argument has any other value, the behavior is undefined." >>>> >>>> Undefined behavior may or may not involve a program crash. >>> I would still consider a crash to be a bug. Undefined would just be >>> returning >>> rubbish. >> >> Undefined behaviour means there is no define behaviour - crashing is >> entirely plausible. It doesn't matter what /you/ think about it. The C >> standard is quite clear about this - if you pass a valid argument to >> isdigit(), as specified in the standard, you'll get a valid result. If >> you pass something invalid, all bets are off and whatever happens is /your/ >> problem. >> >> This is so fundamental to the whole concept of programming that I am >> regularly surprised by people who call themselves programmers, yet fail >> to comprehend it. A function has a specified input domain, and a specified >> result or behaviour for inputs in that domain. Move outside that input >> domain, and you are in the realm of nonsense. > > This is formally true, but I think we can also legitimately ask to what > extent a function's domain (and the corresponding returned values) are > reasonable and helpful. > Sure. You could, for example, argue that "isdigit" would be better designed if it were to return "false" on any int value outside of the current valid range. But it might be less efficient if it had such an extended domain - do you optimise for maximum efficiency for programmers who are able to read and follow specifications and write correct code, or do you optimise for minimal surprise for programmers who can't or won't follow the specifications? I'd say that for C, it's the former - let those who don't understand the importance of following specifications use a different language more suited to their needs, wants and skills. There is a time and a place for making functions with maximal input domains and controlled handling of nonsensical inputs - low-level functions like "isdigit" are not such cases. >> You don't expect particular >> behaviour from 1/0 - maybe you'll get a random value, maybe you'll get a >> crash. Why you think calling isdigit() with an invalid input should have >> some guarantees is beyond me. "Garbage in, garbage out" applies to >> behaviour, not just values, and has been understood since Babbage designed >> the first programmable mechanical computer. > > Those of us with a background in languages like C are not going to be > confused, but I bet almost everyone who comes to C from a more modern > language will be astonished by what you have to do to get isdigit to > work safely. To have a character testing function that does not work > for all the values of the language's char type is, well, bonkers. > IMHO the concept of "character" in C and C++ is a mess these days. It was perhaps inevitable, given the history of the languages, the development of characters, and the overriding requirement for backwards compatibility. The notion of "signed characters" and "unsigned characters" is insane. The jumble of "wide characters" and various varieties of UTF formats is confusing at best. There are various character sets - source, execution, basic, extended, whatever (the terms seem to change regularly, especially in C++). Sometimes these are the same, sometimes different. Some of the different character types are the same size as others, but have different interpretations. Sometimes they have the same interpretations, but are still distinct. Some of the standard C library functions work only on 7-bit ASCII, some will work with UTF-8 as well. Some of them work with "int" parameters instead of more logical "char" types, and support non-character values (like EOF) in functions that appear to take character parameters. And some functions treat EOF as a normal character. And if you are coming to C from pretty much any other language, you'll be shocked at the rudimentary "string" support. So while I agree that it might be surprising to find that "isdigit()" is not defined for all possible values of all character types, I think it would be /way/ down the list. This is not a criticism of C - different languages are better and worse for different things. But if you are working in C, you have to learn C - you can't just assume it is like whatever other languages you have used. And if C and C++ were to try to be like other languages, such as by specifying values for every int value in "isdigit" calls, or having "isdigit" throw a C++ exception on bad values, you'd lose some of the aspects that make C and C++ important and useful languages. > In Haskell, a program won't even compile unless isDigit is called with > an argument of type Char, and the result is defined to be exactly one > of True or False for all values of that type. > > And that brings up another trap for the unwary: C's isdigit returns > something that is only vaguely Boolean. For example, you can't test if > char c1, c2; are both digits or neither are digits with > > isdigit(c1) == isdigit(c2) > > because the value indicating "yes" is not guaranteed to be anything > other than "not zero". Instead you'd write > > !isdigit((unsigned char)c1) == !isdigit((unsigned char)c2) > > I think an occasional nod to how we have got used to such nonsense is > merited! > Yes, absolutely.
[toc] | [prev] | [next] | [standalone]
| From | Muttley@dastardlyhq.com |
|---|---|
| Date | 2023-02-23 16:10 +0000 |
| Message-ID | <tt836j$1tkv3$1@dont-email.me> |
| In reply to | #89226 |
On Thu, 23 Feb 2023 15:02:56 +0100 David Brown <david.brown@hesbynett.no> wrote: >On 23/02/2023 11:34, Muttley@dastardlyhq.com wrote: >> I would still consider a crash to be a bug. Undefined would just be returning > >> rubbish. > >Undefined behaviour means there is no define behaviour - crashing is >entirely plausible. It doesn't matter what /you/ think about it. The C >standard is quite clear about this - if you pass a valid argument to >isdigit(), as specified in the standard, you'll get a valid result. If >you pass something invalid, all bets are off and whatever happens is >/your/ problem. > >This is so fundamental to the whole concept of programming that I am >regularly surprised by people who call themselves programmers, yet fail >to comprehend it. A function has a specified input domain, and a Sorry, I get tired of people resorting to "undefined" as some kind of get out clause for some badly written API crashing whole program. isdigit() is a yes/no function. If it is a valid digit it returns 1 else it returns 0 regardless. Crashing is a bug. End of. >maybe you'll get a crash. Why you think calling isdigit() with an Oh ok. How about this then? int i; ++i; The result is undefined. Presumably you think ++ crashing the program is an acceptable outcome? >invalid input should have some guarantees is beyond me. "Garbage in, >garbage out" applies to behaviour, not just values, and has been >understood since Babbage designed the first programmable mechanical >computer. Garbage out != program crashes. >So yes, there is a bug - it's in /your/ code if you pass an invalid >value to the function. BS. >implementation of the <ctype.h> classification functions involves lookup >tables, and it is quite reasonable for a negative value to lead to >things going horribly wrong. So when did out of bounds array accessing become "undefined" in your world then rather than a bug?
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2023-02-23 20:46 +0100 |
| Message-ID | <tt8fpo$1v0vs$2@dont-email.me> |
| In reply to | #89235 |
On 23/02/2023 17:10, Muttley@dastardlyhq.com wrote: > On Thu, 23 Feb 2023 15:02:56 +0100 > David Brown <david.brown@hesbynett.no> wrote: >> On 23/02/2023 11:34, Muttley@dastardlyhq.com wrote: >>> I would still consider a crash to be a bug. Undefined would just be returning >> >>> rubbish. >> >> Undefined behaviour means there is no define behaviour - crashing is >> entirely plausible. It doesn't matter what /you/ think about it. The C >> standard is quite clear about this - if you pass a valid argument to >> isdigit(), as specified in the standard, you'll get a valid result. If >> you pass something invalid, all bets are off and whatever happens is >> /your/ problem. >> >> This is so fundamental to the whole concept of programming that I am >> regularly surprised by people who call themselves programmers, yet fail >> to comprehend it. A function has a specified input domain, and a > > Sorry, I get tired of people resorting to "undefined" as some kind of get > out clause for some badly written API crashing whole program. isdigit() is a > yes/no function. If it is a valid digit it returns 1 else it returns 0 > regardless. Crashing is a bug. End of. Sorry, I get tired of people who think /their/ ideas of how languages work is somehow correct, despite how it contradicts the actual definition and implementations of the language. You can argue that this is how the function /should/ work until you are blue in the face. It doesn't change the simple facts about how it /does/ work. As Ben said, it's fine to question if the design choices of the C standard library functions were the "best" choices (for whatever value of "best" you want to pick). But there is no point in arguing with reality. > >> maybe you'll get a crash. Why you think calling isdigit() with an > > Oh ok. How about this then? > > int i; > ++i; > > The result is undefined. Presumably you think ++ crashing the program is > an acceptable outcome? > Sure. I greatly prefer a warning from the compiler that there is a bug in my code. And I don't expect the compiler to go out of its way to cause a crash - I expect it to generate efficient code as best it can. But with a bug in the source code I can't expect the compiler to somehow generate "correct" code. And I /like/ the fact that a C implementation is allowed to crash the program when you try to execute undefined behaviour. That's what allows you to have tools like sanitizers - compiler this with gcc or clang with the undefined behaviour sanitizer enabled, and the program /will/ crash at that point (along with an error message). That makes it easier to find the bug. >> invalid input should have some guarantees is beyond me. "Garbage in, >> garbage out" applies to behaviour, not just values, and has been >> understood since Babbage designed the first programmable mechanical >> computer. > > Garbage out != program crashes. > Garbage out includes behaviour. You seem to have fallen for the myth that nonsense data values are somehow not as bad as nonsense control flow - that undefined behaviour should be allowed to give incorrect results (not that there are any /correct/ results possible) but not give unexpected control flow changes. This is a very seductive concept - even the C standards committee fell for it, making "Annex L - Analyzability" that distinguishes between "bounded undefined behaviour" and "critical undefined behaviour". The problem is, it is bogus. That is why no one has ever tried to implement anything in Annex L (or at least, no one has succeeded). Bugs propagate. Invalid data spreads - causing more trouble, including control flow faults. int arr[100]; int i = foo(x); arr[i] = 123; If "foo()" is specified to return a value between 0 and 100 for an argument between 0 and 1000, and you pass x equal to -1, does it matter if "foo(-1)" crashes, or returns a random value outside of 0 to 100 ? You are screwed either way. You have a bug in your code. You failed to follow the specifications of the function, and things will go wrong. Maybe the write will cause an immediate crash. Maybe it will overwrite the return address on the stack, causing a leap into the unknown. There's no way of telling. >> So yes, there is a bug - it's in /your/ code if you pass an invalid >> value to the function. > > BS. So tell us, whose fault is it that you have not followed the specification for the function? Your cat's ? > >> implementation of the <ctype.h> classification functions involves lookup >> tables, and it is quite reasonable for a negative value to lead to >> things going horribly wrong. > > So when did out of bounds array accessing become "undefined" in your world > then rather than a bug? > It became "undefined behaviour" when the C standard said it was. You don't even have to access the object - simply calculating the out of bounds address is undefined behaviour (except that you can calculate - but not dereference - one past the end of the array). If you try to execute undefined behaviour, you have a bug in the code - since the behaviour is not defined, it cannot possibly match the behaviour you want, and is therefore a bug. If you have a bug in your code, the code will be doing something that you did not intend - you could argue that since you have not defined the behaviour the code actually exhibits, then it is executing undefined behaviour. The concepts of "bug" and "undefined behaviour" are strongly related.
[toc] | [prev] | [next] | [standalone]
| From | scott@slp53.sl.home (Scott Lurndal) |
|---|---|
| Date | 2023-02-23 20:05 +0000 |
| Message-ID | <aGPJL.1598002$GNG9.1012241@fx18.iad> |
| In reply to | #89257 |
David Brown <david.brown@hesbynett.no> writes: >On 23/02/2023 17:10, Muttley@dastardlyhq.com wrote: >> On Thu, 23 Feb 2023 15:02:56 +0100 >> David Brown <david.brown@hesbynett.no> wrote: >>> On 23/02/2023 11:34, Muttley@dastardlyhq.com wrote: >>>> I would still consider a crash to be a bug. Undefined would just be returning >>> >>>> rubbish. >>> >>> Undefined behaviour means there is no define behaviour - crashing is >>> entirely plausible. It doesn't matter what /you/ think about it. The C >>> standard is quite clear about this - if you pass a valid argument to >>> isdigit(), as specified in the standard, you'll get a valid result. If >>> you pass something invalid, all bets are off and whatever happens is >>> /your/ problem. >>> >>> This is so fundamental to the whole concept of programming that I am >>> regularly surprised by people who call themselves programmers, yet fail >>> to comprehend it. A function has a specified input domain, and a >> >> Sorry, I get tired of people resorting to "undefined" as some kind of get >> out clause for some badly written API crashing whole program. isdigit() is a >> yes/no function. If it is a valid digit it returns 1 else it returns 0 >> regardless. Crashing is a bug. End of. > >Sorry, I get tired of people who think /their/ ideas of how languages >work is somehow correct, despite how it contradicts the actual >definition and implementations of the language. And, of course, when 'isdigit' et alia were designed, 7-bit ASCII was limited to the positive subset of a signed 8-bit character, and there was no need to ever pass the value assigned to the EOF macro. if (isascii(c) && isdigit(c)) is using the API in the manner in which it was designed.
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <Keith.S.Thompson+u@gmail.com> |
|---|---|
| Date | 2023-02-23 14:48 -0800 |
| Message-ID | <87wn48ngkm.fsf@nosuchdomain.example.com> |
| In reply to | #89258 |
scott@slp53.sl.home (Scott Lurndal) writes:
[...]
> And, of course, when 'isdigit' et alia were designed, 7-bit ASCII was
> limited to the positive subset of a signed 8-bit character, and
> there was no need to ever pass the value assigned to the EOF macro.
>
> if (isascii(c) && isdigit(c))
>
> is using the API in the manner in which it was designed.
Perhaps, but isascii() was never included in the C or C++ standard
(neither of which excludes EBCDIC or other character sets).
The is*() and to*() functions can safely handle the value returned
by getchar(), which is an int either in the range of unsigned char
or equal to EOF. They cannot safely handle arbitrary values in
a string.
The undefined behavior for negative values other than EOF is clearly
stated in the standard, so any program that fails because of it
is a buggy program -- but I suggest that it's also a misfeature,
and arguably a bug, in the standard itself.
I wouldn't mind seeing a future standard require plain char to be
unsigned. I wonder if there are any strong arguments against that.
(Yes, it would require some work for compiler and library implementers.)
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for XCOM Labs
void Void(void) { Void(); } /* The recursive call of the void */
[toc] | [prev] | [next] | [standalone]
| From | Richard Damon <Richard@Damon-Family.org> |
|---|---|
| Date | 2023-02-23 22:12 -0500 |
| Message-ID | <UWVJL.123355$jiuc.38092@fx44.iad> |
| In reply to | #89264 |
On 2/23/23 5:48 PM, Keith Thompson wrote: > scott@slp53.sl.home (Scott Lurndal) writes: > [...] >> And, of course, when 'isdigit' et alia were designed, 7-bit ASCII was >> limited to the positive subset of a signed 8-bit character, and >> there was no need to ever pass the value assigned to the EOF macro. >> >> if (isascii(c) && isdigit(c)) >> >> is using the API in the manner in which it was designed. > > Perhaps, but isascii() was never included in the C or C++ standard > (neither of which excludes EBCDIC or other character sets). > > The is*() and to*() functions can safely handle the value returned > by getchar(), which is an int either in the range of unsigned char > or equal to EOF. They cannot safely handle arbitrary values in > a string. > > The undefined behavior for negative values other than EOF is clearly > stated in the standard, so any program that fails because of it > is a buggy program -- but I suggest that it's also a misfeature, > and arguably a bug, in the standard itself. > > I wouldn't mind seeing a future standard require plain char to be > unsigned. I wonder if there are any strong arguments against that. > (Yes, it would require some work for compiler and library implementers.) > The one strong arguement against it is that many existing implementatons have docuemented that there char is signed, and many application (non-portable) have been written based on that assumption. FORCING a quietly breaking change to an implementation that breaks existing applications goes against the general philosophy the Standards Committee has been following.
[toc] | [prev] | [next] | [standalone]
| From | Paavo Helde <eesnimi@osa.pri.ee> |
|---|---|
| Date | 2023-02-24 10:49 +0200 |
| Message-ID | <tt9tnb$25sb5$1@dont-email.me> |
| In reply to | #89264 |
24.02.2023 00:48 Keith Thompson kirjutas: I wouldn't mind seeing a future standard require plain char to be > unsigned. I wonder if there are any strong arguments against that. > (Yes, it would require some work for compiler and library implementers.) I encountered this scenario last year when porting our codebase to aarch64. It was broken all over the place and it took me several days to cope with the char being unsigned. Admitted, this was because we had used char as a synonym for std::int8 (codebase originates from before std::int8) and there was a ton of code for working with numeric arrays of that type. Thankfully most of that code was templated, so could be adjusted relatively easily. For strings there were only a couple of fixes, like UTF-8 handling functions assuming the multibyte character values are negative, etc.
[toc] | [prev] | [next] | [standalone]
| From | Ralf Fassel <ralfixx@gmx.de> |
|---|---|
| Date | 2023-02-24 11:36 +0100 |
| Message-ID | <ygattzb73kp.fsf@akutech.de> |
| In reply to | #89258 |
* scott@slp53.sl.home (Scott Lurndal) | And, of course, when 'isdigit' et alia were designed, 7-bit ASCII was | limited to the positive subset of a signed 8-bit character, and | there was no need to ever pass the value assigned to the EOF macro. > | if (isascii(c) && isdigit(c)) > | is using the API in the manner in which it was designed. Isn't isascii(c) suffering from the same problem as isdigit(c) and the rest? At least my linux manpage for isascii() makes no exception for isascii() about the allowed input range (EOF, unsigned char). R'
[toc] | [prev] | [next] | [standalone]
| From | scott@slp53.sl.home (Scott Lurndal) |
|---|---|
| Date | 2023-02-24 15:39 +0000 |
| Message-ID | <fT4KL.1173137$iS99.427921@fx16.iad> |
| In reply to | #89278 |
Ralf Fassel <ralfixx@gmx.de> writes: >* scott@slp53.sl.home (Scott Lurndal) >| And, of course, when 'isdigit' et alia were designed, 7-bit ASCII was >| limited to the positive subset of a signed 8-bit character, and >| there was no need to ever pass the value assigned to the EOF macro. >> >| if (isascii(c) && isdigit(c)) >> >| is using the API in the manner in which it was designed. > >Isn't isascii(c) suffering from the same problem as isdigit(c) and the rest? #define isascii(c) (!((c) & ~0177))
[toc] | [prev] | [next] | [standalone]
| From | Muttley@dastardlyhq.com |
|---|---|
| Date | 2023-02-24 10:29 +0000 |
| Message-ID | <tta3hm$26h6b$1@dont-email.me> |
| In reply to | #89257 |
On Thu, 23 Feb 2023 20:46:00 +0100 David Brown <david.brown@hesbynett.no> wrote: >On 23/02/2023 17:10, Muttley@dastardlyhq.com wrote: >> Sorry, I get tired of people resorting to "undefined" as some kind of get >> out clause for some badly written API crashing whole program. isdigit() is a >> yes/no function. If it is a valid digit it returns 1 else it returns 0 >> regardless. Crashing is a bug. End of. > >Sorry, I get tired of people who think /their/ ideas of how languages >work is somehow correct, despite how it contradicts the actual >definition and implementations of the language. We're not talking about the language, we're talking about API functions. the is*() functions unlike printf are not built in to the compiler. >You can argue that this is how the function /should/ work until you are >blue in the face. It doesn't change the simple facts about how it >/does/ work. I'm aware how it does work. I'm also saying that crashing is a bug. You and a lot of other people seem to have trouble differentiating the following: logic bug crash bug A non variadic C function being passed non pointer primitive types should be able to cope with ALL possible inputs without going tits up. If it doesn't its badly written. Indexing an array without checking the index value is beginners error 101 and there is NO EXCUSE WHATSOEVER for that sort of code being in a common library function. >> The result is undefined. Presumably you think ++ crashing the program is >> an acceptable outcome? >> > >Sure. > >I greatly prefer a warning from the compiler that there is a bug in my >code. And I don't expect the compiler to go out of its way to cause a >crash - I expect it to generate efficient code as best it can. But with >a bug in the source code I can't expect the compiler to somehow generate >"correct" code. Seems to me you're just arguing the toss for the sake of it now.
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2023-02-24 17:20 +0100 |
| Message-ID | <ttao4g$28m2r$2@dont-email.me> |
| In reply to | #89276 |
On 24/02/2023 11:29, Muttley@dastardlyhq.com wrote: > On Thu, 23 Feb 2023 20:46:00 +0100 > David Brown <david.brown@hesbynett.no> wrote: >> On 23/02/2023 17:10, Muttley@dastardlyhq.com wrote: >>> Sorry, I get tired of people resorting to "undefined" as some kind of get >>> out clause for some badly written API crashing whole program. isdigit() is a >>> yes/no function. If it is a valid digit it returns 1 else it returns 0 >>> regardless. Crashing is a bug. End of. >> >> Sorry, I get tired of people who think /their/ ideas of how languages >> work is somehow correct, despite how it contradicts the actual >> definition and implementations of the language. > > We're not talking about the language, we're talking about API functions. > the is*() functions unlike printf are not built in to the compiler. I don't know what distinction you are trying to make, but I really think you'd benefit from a quick read through the C standards before you make more posts. Both the "is*()" functions and "printf" are specified in the C standards, which do not distinguish between the "core language" and the "standard library" - both aspects are part of the C programming language. Compilers do not define the C language - the standards define it. It makes no sense to talk about "the compiler" when there are many hundreds of C compilers. All of the C standard library functions are, by definition, part of the standard library rather than part of a compiler. Some compilers have additional handling of some library functions for optimisation purposes or additional static error checking. gcc, for example, can optimise some calls to "printf" and some calls to "is*" functions to generate code that is functionally equivalent to calling the library functions, on the assumption that the input values are valid. > >> You can argue that this is how the function /should/ work until you are >> blue in the face. It doesn't change the simple facts about how it >> /does/ work. > > I'm aware how it does work. I'm also saying that crashing is a bug. > Yes - the bug is in the code that calls the function with invalid inputs. Again, it is reasonable to argue that the functions would have been better if they had been specified differently. It is also reasonable to argue that they are outdated and unsuitable for modern code, and should be deprecated. But as long as they exist and are specified the way they are specified, if /you/ choose to use them it is /your/ responsibility to follow the specifications. Failure to use them correctly is /your/ fault. > You and a lot of other people seem to have trouble differentiating the > following: > > logic bug > crash bug > You can make up whatever classifications of bugs you like - whatever helps you keep the bugs out of your code. But that doesn't mean anyone else has to follow the same distinctions. > A non variadic C function being passed non pointer primitive types should be > able to cope with ALL possible inputs without going tits up. Says who? Some random guy off the internet? The C standards don't say anything of the kind, and it is the standards that define the language, not the personal preferences of one particular programmer. When I write a function, I expect anyone calling it to know what the function does and what the valid inputs are. If this information is not clear, then I have done a bad job in the naming, specification, documentation, etc. But it would never occur to me to add extra code to my functions that make everything bigger and slower, in an effort to pander to muppets who don't know how to write code. (I might, on occasion, add extra checks to aid debugging - though that is usually temporary, and is often in the form of "print an error message and crash the program".) If I am writing a function, my job is to give the expected results and behaviour for valid inputs. Usually it must do so as efficiently as reasonably possible (while remaining clear and understandable, maintainable, in budget, etc.) - if efficiency is not relevant, then C and C++ are probably the wrong languages. If I am documenting or specifying a function, my job is to make the preconditions clear and the postconditions clear. If i am using a function, my job is to understand the requirements of the function and its effects, and make sure the requirements are fulfilled before calling it. Of course there are areas where it /is/ appropriate - indeed, essential - to check the validity of inputs to functions. You don't do it for low-level functions like the standard library functions, but you might do it for API's in higher level libraries, and you certainly do it when you are crossing boundaries relevant to security, OS stability, across processes, etc. You validate input from outside your control if something other than the caller might suffer if the input is invalid. But you don't have to treat the buggy caller nicely - you merely have to make sure that a buggy caller can't cause trouble for anything else. (Of course it is /nice/ if you have a convenient way to give feedback about the problem to help programmers fix the bug.) > If it doesn't its > badly written. Indexing an array without checking the index value is beginners > error 101 and there is NO EXCUSE WHATSOEVER for that sort of code being in a > common library function. Calling a function without knowing the validity of the parameters is the problem. You should not know or care how the function is implemented, or what happens for invalid input. Unnecessary checks for index range would just be a waste for every program that is written correctly. Should every dereference of a point first check if the point is valid? Should every integer arithmetic expression check values to ensure there is no overflow? Should every programmer arbitrarily invent their own rules as to what rules other people should follow? Should every competent C programmer have their code efficiency punished by unnecessary checks because of poor-quality developers that don't understand the fundamentals of programming? People make mistakes, no matter how skilled or experienced, and it's good to have tools and aids to help them find those mistakes. But the emphasis is on finding and fixing the problems - not pretending it is helpful to cover up the errors. > >>> The result is undefined. Presumably you think ++ crashing the program is >>> an acceptable outcome? >>> >> >> Sure. >> >> I greatly prefer a warning from the compiler that there is a bug in my >> code. And I don't expect the compiler to go out of its way to cause a >> crash - I expect it to generate efficient code as best it can. But with >> a bug in the source code I can't expect the compiler to somehow generate >> "correct" code. > > Seems to me you're just arguing the toss for the sake of it now. > It seems to me that you are wrong.
[toc] | [prev] | [next] | [standalone]
| From | Muttley@dastardlyhq.com |
|---|---|
| Date | 2023-02-24 17:09 +0000 |
| Message-ID | <ttar0p$28vd0$1@dont-email.me> |
| In reply to | #89287 |
On Fri, 24 Feb 2023 17:20:32 +0100 David Brown <david.brown@hesbynett.no> wrote: >On 24/02/2023 11:29, Muttley@dastardlyhq.com wrote: >> On Thu, 23 Feb 2023 20:46:00 +0100 >> David Brown <david.brown@hesbynett.no> wrote: >>> On 23/02/2023 17:10, Muttley@dastardlyhq.com wrote: >>>> Sorry, I get tired of people resorting to "undefined" as some kind of get >>>> out clause for some badly written API crashing whole program. isdigit() is >a >>>> yes/no function. If it is a valid digit it returns 1 else it returns 0 >>>> regardless. Crashing is a bug. End of. >>> >>> Sorry, I get tired of people who think /their/ ideas of how languages >>> work is somehow correct, despite how it contradicts the actual >>> definition and implementations of the language. >> >> We're not talking about the language, we're talking about API functions. >> the is*() functions unlike printf are not built in to the compiler. > >I don't know what distinction you are trying to make, but I really think The distinction is that with built in functions the compiler can tell you if you're passing daft values. Eg: many compilers will warning you if you try to pass a non pointer to %s in printf which they couldn't do at compile time if printf was a normal library function. >> I'm aware how it does work. I'm also saying that crashing is a bug. >> > >Yes - the bug is in the code that calls the function with invalid inputs. No - the bug is in the library function not bounds checking indexes into an array. Do you think not bounds checking a C array index is professional code? A simple yes/no will suffice.
[toc] | [prev] | [next] | [standalone]
| From | scott@slp53.sl.home (Scott Lurndal) |
|---|---|
| Date | 2023-02-24 17:32 +0000 |
| Message-ID | <dx6KL.128465$wfQc.61586@fx43.iad> |
| In reply to | #89294 |
Muttley@dastardlyhq.com writes:
>On Fri, 24 Feb 2023 17:20:32 +0100
>David Brown <david.brown@hesbynett.no> wrote:
>>On 24/02/2023 11:29, Muttley@dastardlyhq.com wrote:
>>> On Thu, 23 Feb 2023 20:46:00 +0100
>>> David Brown <david.brown@hesbynett.no> wrote:
>>>> On 23/02/2023 17:10, Muttley@dastardlyhq.com wrote:
>>>>> Sorry, I get tired of people resorting to "undefined" as some kind of get
>>>>> out clause for some badly written API crashing whole program. isdigit() is
>>a
>>>>> yes/no function. If it is a valid digit it returns 1 else it returns 0
>>>>> regardless. Crashing is a bug. End of.
>>>>
>>>> Sorry, I get tired of people who think /their/ ideas of how languages
>>>> work is somehow correct, despite how it contradicts the actual
>>>> definition and implementations of the language.
>>>
>>> We're not talking about the language, we're talking about API functions.
>>> the is*() functions unlike printf are not built in to the compiler.
>>
>>I don't know what distinction you are trying to make, but I really think
>
>The distinction is that with built in functions the compiler can tell you
>if you're passing daft values. Eg: many compilers will warning you if you
>try to pass a non pointer to %s in printf which they couldn't do at compile
>time if printf was a normal library function.
Why do you think that?
void log(const char *, ...)
__attribute__((format(printf, 2, 3)));
size_t trace(const char *, ...)
__attribute__((format(printf, 2, 3)));
[toc] | [prev] | [next] | [standalone]
| From | Muttley@dastardlyhq.com |
|---|---|
| Date | 2023-02-25 11:56 +0000 |
| Message-ID | <ttct0j$2ibcl$1@dont-email.me> |
| In reply to | #89297 |
On Fri, 24 Feb 2023 17:32:57 GMT scott@slp53.sl.home (Scott Lurndal) wrote: >Muttley@dastardlyhq.com writes: >>On Fri, 24 Feb 2023 17:20:32 +0100 >>David Brown <david.brown@hesbynett.no> wrote: >>>On 24/02/2023 11:29, Muttley@dastardlyhq.com wrote: >>>> On Thu, 23 Feb 2023 20:46:00 +0100 >>>> David Brown <david.brown@hesbynett.no> wrote: >>>>> On 23/02/2023 17:10, Muttley@dastardlyhq.com wrote: >>>>>> Sorry, I get tired of people resorting to "undefined" as some kind of get > >>>>>> out clause for some badly written API crashing whole program. isdigit() >is >>>a >>>>>> yes/no function. If it is a valid digit it returns 1 else it returns 0 >>>>>> regardless. Crashing is a bug. End of. >>>>> >>>>> Sorry, I get tired of people who think /their/ ideas of how languages >>>>> work is somehow correct, despite how it contradicts the actual >>>>> definition and implementations of the language. >>>> >>>> We're not talking about the language, we're talking about API functions. >>>> the is*() functions unlike printf are not built in to the compiler. >>> >>>I don't know what distinction you are trying to make, but I really think >> >>The distinction is that with built in functions the compiler can tell you >>if you're passing daft values. Eg: many compilers will warning you if you >>try to pass a non pointer to %s in printf which they couldn't do at compile >>time if printf was a normal library function. > >Why do you think that? > > void log(const char *, ...) > __attribute__((format(printf, 2, 3))); > size_t trace(const char *, ...) > __attribute__((format(printf, 2, 3))); Sorry, which part of that isn't using the printf built-in?
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2023-02-25 16:04 +0100 |
| Message-ID | <ttd82a$2jbog$1@dont-email.me> |
| In reply to | #89309 |
On 25/02/2023 12:56, Muttley@dastardlyhq.com wrote:
> On Fri, 24 Feb 2023 17:32:57 GMT
> scott@slp53.sl.home (Scott Lurndal) wrote:
>> Muttley@dastardlyhq.com writes:
>>> On Fri, 24 Feb 2023 17:20:32 +0100
>>> David Brown <david.brown@hesbynett.no> wrote:
>>>> On 24/02/2023 11:29, Muttley@dastardlyhq.com wrote:
>>>>> On Thu, 23 Feb 2023 20:46:00 +0100
>>>>> David Brown <david.brown@hesbynett.no> wrote:
>>>>>> On 23/02/2023 17:10, Muttley@dastardlyhq.com wrote:
>>>>>>> Sorry, I get tired of people resorting to "undefined" as some kind of get
>>
>>>>>>> out clause for some badly written API crashing whole program. isdigit()
>> is
>>>> a
>>>>>>> yes/no function. If it is a valid digit it returns 1 else it returns 0
>>>>>>> regardless. Crashing is a bug. End of.
>>>>>>
>>>>>> Sorry, I get tired of people who think /their/ ideas of how languages
>>>>>> work is somehow correct, despite how it contradicts the actual
>>>>>> definition and implementations of the language.
>>>>>
>>>>> We're not talking about the language, we're talking about API functions.
>>>>> the is*() functions unlike printf are not built in to the compiler.
>>>>
>>>> I don't know what distinction you are trying to make, but I really think
>>>
>>> The distinction is that with built in functions the compiler can tell you
>>> if you're passing daft values. Eg: many compilers will warning you if you
>>> try to pass a non pointer to %s in printf which they couldn't do at compile
>>> time if printf was a normal library function.
>>
>> Why do you think that?
>>
>> void log(const char *, ...)
>> __attribute__((format(printf, 2, 3)));
>> size_t trace(const char *, ...)
>> __attribute__((format(printf, 2, 3)));
>
> Sorry, which part of that isn't using the printf built-in?
>
All of it.
The "__attribute__" here is a gcc extension (also supported by clang)
that can help check the parameters for a variadic function that takes a
printf-style format string. In cases like this, it is not using
"printf" at all - it is using a printf-style format string in a
completely different function. (There's a fair chance the the
implementation of "log" and "trace" uses snprintf.)
I am sure you can appreciate the difference between doing a bit of
type-checking of variadic function call parameters, and the actual
implementation of a function.
I know of no compiler that has "printf" built in. It is not uncommon to
have some small and regularly used functions built in to compilers when
they can benefit significantly from inlining and optimisation based on
their parameters - examples include memcpy and strlen. Some compilers
can do a few optimisations on bigger standard library functions - gcc
will turn "printf("Hello\n");" into "puts("Hello");". But the real work
of printf and related functions is far to big to be built into a compiler.
Ironically, given your posts, gcc will happily convert "isdigit" calls
into inline code.
[toc] | [prev] | [next] | [standalone]
| From | Muttley@dastardlyhq.com |
|---|---|
| Date | 2023-02-25 15:47 +0000 |
| Message-ID | <ttdaij$2jkoa$1@dont-email.me> |
| In reply to | #89311 |
On Sat, 25 Feb 2023 16:04:42 +0100 David Brown <david.brown@hesbynett.no> wrote: >On 25/02/2023 12:56, Muttley@dastardlyhq.com wrote: >>> Why do you think that? >>> >>> void log(const char *, ...) >>> __attribute__((format(printf, 2, 3))); >>> size_t trace(const char *, ...) >>> __attribute__((format(printf, 2, 3))); >> >> Sorry, which part of that isn't using the printf built-in? >> > >All of it. > >The "__attribute__" here is a gcc extension (also supported by clang) >that can help check the parameters for a variadic function that takes a >printf-style format string. In cases like this, it is not using And that code to check the formatting against the arguments is where exactly?
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2023-02-25 19:13 +0100 |
| Message-ID | <ttdj4r$2khrp$1@dont-email.me> |
| In reply to | #89314 |
On 25/02/2023 16:47, Muttley@dastardlyhq.com wrote: > On Sat, 25 Feb 2023 16:04:42 +0100 > David Brown <david.brown@hesbynett.no> wrote: >> On 25/02/2023 12:56, Muttley@dastardlyhq.com wrote: >>>> Why do you think that? >>>> >>>> void log(const char *, ...) >>>> __attribute__((format(printf, 2, 3))); >>>> size_t trace(const char *, ...) >>>> __attribute__((format(printf, 2, 3))); >>> >>> Sorry, which part of that isn't using the printf built-in? >>> >> >> All of it. >> >> The "__attribute__" here is a gcc extension (also supported by clang) >> that can help check the parameters for a variadic function that takes a >> printf-style format string. In cases like this, it is not using > > And that code to check the formatting against the arguments is where exactly? > The check is in the compiler. But it is not part of the printf function - which is not built into the compiler in any way, and is not used in Scott's code here. I really can't understand why you are trying to argue this - the facts are so clear and simple. You misunderstood, and mixed up a feature for extra static error checking with the printf function itself. That's no problem - people mix up things all the time, and not many people read the details of compiler manuals. But now you know, you can stop trying to pretend you were right.
[toc] | [prev] | [next] | [standalone]
| From | scott@slp53.sl.home (Scott Lurndal) |
|---|---|
| Date | 2023-02-25 19:00 +0000 |
| Message-ID | <8VsKL.129729$wfQc.22877@fx43.iad> |
| In reply to | #89316 |
David Brown <david.brown@hesbynett.no> writes:
>On 25/02/2023 16:47, Muttley@dastardlyhq.com wrote:
>> On Sat, 25 Feb 2023 16:04:42 +0100
>> David Brown <david.brown@hesbynett.no> wrote:
>>> On 25/02/2023 12:56, Muttley@dastardlyhq.com wrote:
>>>>> Why do you think that?
>>>>>
>>>>> void log(const char *, ...)
>>>>> __attribute__((format(printf, 2, 3)));
>>>>> size_t trace(const char *, ...)
>>>>> __attribute__((format(printf, 2, 3)));
>>>>
>>>> Sorry, which part of that isn't using the printf built-in?
>>>>
>>>
>>> All of it.
>>>
>>> The "__attribute__" here is a gcc extension (also supported by clang)
>>> that can help check the parameters for a variadic function that takes a
>>> printf-style format string. In cases like this, it is not using
>>
>> And that code to check the formatting against the arguments is where exactly?
>>
>
>The check is in the compiler. But it is not part of the printf function
>- which is not built into the compiler in any way, and is not used in
>Scott's code here.
>
>I really can't understand why you are trying to argue this - the facts
>are so clear and simple. You misunderstood, and mixed up a feature for
>extra static error checking with the printf function itself. That's no
>problem - people mix up things all the time, and not many people read
>the details of compiler manuals. But now you know, you can stop trying
>to pretend you were right.
>
The argument checking attribute supports more than just printf-style format
strings:
`format (ARCHETYPE, STRING-INDEX, FIRST-TO-CHECK)'
The `format' attribute specifies that a function takes `printf',
`scanf', `strftime' or `strfmon' style arguments that should be
type-checked against a format string. For example, the
declaration:
extern int
my_printf (void *my_object, const char *my_format, ...)
__attribute__ ((format (printf, 2, 3)));
causes the compiler to check the arguments in calls to `my_printf'
for consistency with the `printf' style format string argument
`my_format'.
The parameter ARCHETYPE determines how the format string is
interpreted, and should be `printf', `scanf', `strftime',
`gnu_printf', `gnu_scanf', `gnu_strftime' or `strfmon'. (You can
also use `__printf__', `__scanf__', `__strftime__' or
`__strfmon__'.) On MinGW targets, `ms_printf', `ms_scanf', and
`ms_strftime' are also present. ARCHETYPE values such as `printf'
refer to the formats accepted by the system's C runtime library,
while values prefixed with `gnu_' always refer to the formats
accepted by the GNU C Library. On Microsoft Windows targets,
values prefixed with `ms_' refer to the formats accepted by the
`msvcrt.dll' library. The parameter STRING-INDEX specifies which
argument is the format string argument (starting from 1), while
FIRST-TO-CHECK is the number of the first argument to check
against the format string. For functions where the arguments are
not available to be checked (such as `vprintf'), specify the third
parameter as zero. In this case the compiler only checks the
format string for consistency. For `strftime' formats, the third
parameter is required to be zero. Since non-static C++ methods
have an implicit `this' argument, the arguments of such methods
should be counted from two, not one, when giving values for
STRING-INDEX and FIRST-TO-CHECK.
[toc] | [prev] | [next] | [standalone]
| From | Muttley@dastardlyhq.com |
|---|---|
| Date | 2023-02-27 08:43 +0000 |
| Message-ID | <tthqf1$37l50$1@dont-email.me> |
| In reply to | #89316 |
On Sat, 25 Feb 2023 19:13:47 +0100 David Brown <david.brown@hesbynett.no> wrote: >On 25/02/2023 16:47, Muttley@dastardlyhq.com wrote: >> On Sat, 25 Feb 2023 16:04:42 +0100 >> David Brown <david.brown@hesbynett.no> wrote: >>> On 25/02/2023 12:56, Muttley@dastardlyhq.com wrote: >>>>> Why do you think that? >>>>> >>>>> void log(const char *, ...) >>>>> __attribute__((format(printf, 2, 3))); >>>>> size_t trace(const char *, ...) >>>>> __attribute__((format(printf, 2, 3))); >>>> >>>> Sorry, which part of that isn't using the printf built-in? >>>> >>> >>> All of it. >>> >>> The "__attribute__" here is a gcc extension (also supported by clang) >>> that can help check the parameters for a variadic function that takes a >>> printf-style format string. In cases like this, it is not using >> >> And that code to check the formatting against the arguments is where exactly? > >> > >The check is in the compiler. But it is not part of the printf function >- which is not built into the compiler in any way, and is not used in >Scott's code here. So how does putting "format(printf" there work if it doesn't know about printf?
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2023-02-27 10:31 +0100 |
| Message-ID | <ttht9e$37ui1$2@dont-email.me> |
| In reply to | #89320 |
On 27/02/2023 09:43, Muttley@dastardlyhq.com wrote: > On Sat, 25 Feb 2023 19:13:47 +0100 > David Brown <david.brown@hesbynett.no> wrote: >> On 25/02/2023 16:47, Muttley@dastardlyhq.com wrote: >>> On Sat, 25 Feb 2023 16:04:42 +0100 >>> David Brown <david.brown@hesbynett.no> wrote: >>>> On 25/02/2023 12:56, Muttley@dastardlyhq.com wrote: >>>>>> Why do you think that? >>>>>> >>>>>> void log(const char *, ...) >>>>>> __attribute__((format(printf, 2, 3))); >>>>>> size_t trace(const char *, ...) >>>>>> __attribute__((format(printf, 2, 3))); >>>>> >>>>> Sorry, which part of that isn't using the printf built-in? >>>>> >>>> >>>> All of it. >>>> >>>> The "__attribute__" here is a gcc extension (also supported by clang) >>>> that can help check the parameters for a variadic function that takes a >>>> printf-style format string. In cases like this, it is not using >>> >>> And that code to check the formatting against the arguments is where exactly? >> >>> >> >> The check is in the compiler. But it is not part of the printf function >> - which is not built into the compiler in any way, and is not used in >> Scott's code here. > > So how does putting "format(printf" there work if it doesn't know about printf? > You misunderstand. A compiler can /know/ about a standard library function, without having an /implementation/ of it. An actual implementation of "printf" is in not "built in" to gcc (or any other compiler that I have seen). But a knowledge of the specification of "printf" might be. The compiler has no idea where the output of "printf" ends up, or how it will get there - that is up to the library that implements printf, the OS that runs the program, and many other factors. But it /does/ know that if you call printf with the format string "%i%s", then you need two extra parameters - the first one of which is an "int" (after default promotion for variadic functions), and the second one is a string. So a compiler can check that you have the right parameters to "printf" even if the function is not built into the compiler. In particular with the case of gcc, the compiler has a checking feature for printf-style format strings (and scanf, and a couple of other formats). The declaration of "printf" in <stdio.h> in standard libraries used with gcc will have "__attribute__((format(printf..." in their declaration. The parameter type checking is built into the compiler, the function implementation is not. (gcc has knowledge of a few other aspects of printf and friends - sometimes it can figure out optimisations in a certain specific cases. It might know, for example, some relations between varieties like fprintf and printf, and it tries to do some buffer size checks on sprintf and snprintf. But for anything non-trivial, it calls the external library function to do the real work.)
[toc] | [prev] | [next] | [standalone]
Page 4 of 11 — ← Prev page 1 2 3 [4] 5 6 … 11 Next page →
Back to top | Article view | comp.lang.c++
csiph-web