Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #124080 > unrolled thread

Auto-execute code at exit?

Started by"Rick C. Hodgin" <rick.c.hodgin@gmail.com>
First post2017-12-09 16:20 -0800
Last post2017-12-24 21:04 -0800
Articles 20 on this page of 320 — 28 participants

Back to article view | Back to comp.lang.c


Contents

  Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-09 16:20 -0800
    Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-10 00:31 +0000
      Re: Auto-execute code at exit? gordonb.k2333@burditt.org (Gordon Burditt) - 2017-12-09 20:40 -0600
      Re: Auto-execute code at exit? fir <profesor.fir@gmail.com> - 2017-12-10 02:21 -0800
        Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-10 11:50 +0000
          Re: Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-10 04:19 -0800
          Re: Auto-execute code at exit? fir <profesor.fir@gmail.com> - 2017-12-10 04:32 -0800
            Re: Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-10 04:43 -0800
              Re: Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-10 05:03 -0800
              Who's a troll now? (Was: Auto-execute code at exit?) gazelle@shell.xmission.com (Kenny McCormack) - 2017-12-10 14:01 +0000
      Re: Auto-execute code at exit? scott@slp53.sl.home (Scott Lurndal) - 2017-12-11 15:19 +0000
        Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-11 15:46 +0000
          Re: Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-11 08:04 -0800
            Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-11 18:35 +0000
              Re: Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-11 11:09 -0800
                Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-11 20:28 +0000
                  Re: Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-11 12:38 -0800
                  Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-12 09:07 +0100
                    Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-12 11:45 +0000
                      Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-12 13:50 +0100
                        Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-12 19:29 +0000
                          Re: Auto-execute code at exit? Ian Collins <ian-news@hotmail.com> - 2017-12-13 08:52 +1300
                            Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-12 23:04 +0100
                          Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-12 21:08 +0100
                            Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-12 21:40 +0000
                              Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-12 23:22 +0100
                              Re: Auto-execute code at exit? supercat@casperkitty.com - 2017-12-12 15:54 -0800
                                Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-13 00:11 +0000
                                  Re: Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-12 17:38 -0800
                                    Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-13 10:44 +0000
                                      Re: Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-13 03:12 -0800
                                Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-13 10:16 +0100
                    Re: Auto-execute code at exit? Keith Thompson <kst-u@mib.org> - 2017-12-12 09:35 -0800
                      Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-12 20:42 +0100
                Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-12 09:02 +0100
                  Re: Auto-execute code at exit? Ian Collins <ian-news@hotmail.com> - 2017-12-12 21:34 +1300
          Re: Auto-execute code at exit? scott@slp53.sl.home (Scott Lurndal) - 2017-12-11 18:37 +0000
          Re: Auto-execute code at exit? Manfred <noname@invalid.add> - 2017-12-11 19:39 +0100
          Re: Auto-execute code at exit? Gordon Burditt <gordon@hammy.burditt.org> - 2017-12-12 20:54 -0600
    Re: Auto-execute code at exit? Richard Damon <Richard@Damon-Family.org> - 2017-12-09 19:32 -0500
    Re: Auto-execute code at exit? Ian Collins <ian-news@hotmail.com> - 2017-12-10 13:36 +1300
      Re: Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-09 17:14 -0800
    Re: Auto-execute code at exit? Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2017-12-09 21:49 -0700
    Re: Auto-execute code at exit? "Pascal J. Bourguignon" <pjb@informatimago.com> - 2017-12-10 11:04 +0100
    Re: Auto-execute code at exit? "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2017-12-10 20:22 +0800
    Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-10 18:10 +0100
      Re: Auto-execute code at exit? Melzzzzz <Melzzzzz@zzzzz.com> - 2017-12-10 20:48 +0000
    Auto-execute code at exit? mark.bluemel@gmail.com - 2017-12-10 10:59 -0800
      Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-10 20:37 +0100
        Re: Auto-execute code at exit? James Kuyper <jameskuyper@verizon.net> - 2017-12-10 15:58 -0500
        Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-10 22:59 +0000
          Re: Auto-execute code at exit? Melzzzzz <Melzzzzz@zzzzz.com> - 2017-12-11 02:34 +0000
            Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-11 15:33 +0000
              Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-11 16:42 +0100
                Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-11 15:52 +0000
                  Re: Auto-execute code at exit? gazelle@shell.xmission.com (Kenny McCormack) - 2017-12-11 15:53 +0000
                  Re: Auto-execute code at exit? "Pascal J. Bourguignon" <pjb@informatimago.com> - 2017-12-11 17:09 +0100
                    Re: Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-11 08:18 -0800
                      Re: Auto-execute code at exit? "Pascal J. Bourguignon" <pjb@informatimago.com> - 2017-12-11 19:04 +0100
                  Re: Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-11 08:19 -0800
                    Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-11 17:26 +0000
                      Re: Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-11 09:40 -0800
                        Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-11 18:09 +0000
                          Re: Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-11 11:07 -0800
                            Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-11 20:18 +0000
                              Re: Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-11 12:27 -0800
                                Re: Auto-execute code at exit? Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2017-12-11 13:42 -0700
                                  Re: Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-11 12:54 -0800
                                    Re: Auto-execute code at exit? Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2017-12-11 19:34 -0700
                    Re: Auto-execute code at exit? Melzzzzz <Melzzzzz@zzzzz.com> - 2017-12-11 17:46 +0000
                  Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-11 19:31 +0100
                    Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-11 18:48 +0000
                      Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-12 09:36 +0100
                    Re: Auto-execute code at exit? gazelle@shell.xmission.com (Kenny McCormack) - 2017-12-11 18:49 +0000
                    Re: Auto-execute code at exit? scott@slp53.sl.home (Scott Lurndal) - 2017-12-11 20:33 +0000
                      Re: Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-11 12:39 -0800
                        Re: Auto-execute code at exit? scott@slp53.sl.home (Scott Lurndal) - 2017-12-11 21:22 +0000
                          Re: Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-11 13:25 -0800
                          Re: Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-12 05:45 -0800
                      Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-11 21:00 +0000
                        Re: Auto-execute code at exit? Keith Thompson <kst-u@mib.org> - 2017-12-11 13:13 -0800
                          Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-11 21:45 +0000
                            Re: Auto-execute code at exit? Ian Collins <ian-news@hotmail.com> - 2017-12-12 10:46 +1300
                              Re: Auto-execute code at exit? Keith Thompson <kst-u@mib.org> - 2017-12-11 14:04 -0800
                              Re: Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-12 05:42 -0800
                            Re: Auto-execute code at exit? Keith Thompson <kst-u@mib.org> - 2017-12-11 13:53 -0800
                        Re: Auto-execute code at exit? scott@slp53.sl.home (Scott Lurndal) - 2017-12-11 21:21 +0000
                          Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-11 21:53 +0000
              Re: Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-11 08:01 -0800
                Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-11 18:00 +0000
                  Re: Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-11 11:01 -0800
                    Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-11 20:44 +0000
                      Re: Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-11 12:52 -0800
                        Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-11 21:16 +0000
                          Re: Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-11 13:24 -0800
                          Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-12 09:55 +0100
                      Re: Auto-execute code at exit? Sjouke Burry <burrynulnulfour@ppllaanneett.nnll> - 2017-12-11 22:00 +0100
                        Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-11 21:43 +0000
                      Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-12 09:52 +0100
                  Re: Auto-execute code at exit? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-12-11 21:41 +0000
                    Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-11 22:33 +0000
                      Re: Auto-execute code at exit? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-12-12 01:17 +0000
                        Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-12 01:44 +0000
                      Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-12 10:01 +0100
                        Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-12 11:17 +0000
                          Re: Auto-execute code at exit? mark.bluemel@gmail.com - 2017-12-12 03:40 -0800
                            Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-12 12:01 +0000
                              Re: Auto-execute code at exit? mark.bluemel@gmail.com - 2017-12-12 04:50 -0800
                                Re: Auto-execute code at exit? Gareth Owen <gwowen@gmail.com> - 2017-12-12 18:33 +0000
                                  Re: Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-12 10:37 -0800
                                    Re: Auto-execute code at exit? gazelle@shell.xmission.com (Kenny McCormack) - 2017-12-12 21:43 +0000
                                  Re: Auto-execute code at exit? Keith Thompson <kst-u@mib.org> - 2017-12-12 11:31 -0800
                                    Re: Auto-execute code at exit? Gareth Owen <gwowen@gmail.com> - 2017-12-12 20:09 +0000
                          Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-12 13:56 +0100
                            Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-12 19:44 +0000
                              Re: Auto-execute code at exit? Ian Collins <ian-news@hotmail.com> - 2017-12-13 09:07 +1300
                              Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-12 23:28 +0100
                                Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-13 00:08 +0000
                                  Re: Auto-execute code at exit? "Pascal J. Bourguignon" <pjb@informatimago.com> - 2017-12-13 01:42 +0100
                                  Re: Auto-execute code at exit? Ian Collins <ian-news@hotmail.com> - 2017-12-13 16:35 +1300
                                    Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-13 10:55 +0000
                                      Re: Auto-execute code at exit? Melzzzzz <Melzzzzz@zzzzz.com> - 2017-12-13 11:04 +0000
                                        Re: Auto-execute code at exit? Robert Wessel <robertwessel2@yahoo.com> - 2017-12-13 11:45 -0600
                                      Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-13 13:36 +0100
                                      Re: Auto-execute code at exit? Ian Collins <ian-news@hotmail.com> - 2017-12-14 07:34 +1300
                                    Re: Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-13 03:20 -0800
                                  Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-13 11:25 +0100
                                    Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-13 11:50 +0000
                                      Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-13 14:27 +0100
                                        Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-13 14:31 +0000
                                          Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-13 16:56 +0100
                                            Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-13 19:27 +0000
                                              Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-13 21:15 +0100
                                                Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-13 22:48 +0000
                                                  Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-14 07:44 +0100
                                                    Re: Auto-execute code at exit? Gareth Owen <gwowen@gmail.com> - 2017-12-14 06:55 +0000
                                                      Re: Auto-execute code at exit? mark.bluemel@gmail.com - 2017-12-14 00:32 -0800
                                                        Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-15 00:01 +0000
                                                          Re: Auto-execute code at exit? mark.bluemel@gmail.com - 2017-12-15 00:48 -0800
                                                            Why post to Usenet? (Was: Auto-execute code at exit?) gazelle@shell.xmission.com (Kenny McCormack) - 2017-12-15 10:51 +0000
                                                            Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-15 12:18 +0000
                                                              Re: Auto-execute code at exit? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-12-15 17:40 +0000
                                                                Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-15 20:12 +0000
                                                                  Re: Auto-execute code at exit? David Kleinecke <dkleinecke@gmail.com> - 2017-12-15 12:54 -0800
                                                                  Re: Auto-execute code at exit? supercat@casperkitty.com - 2017-12-15 13:51 -0800
                                                                    Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-16 14:46 +0000
                                                                  Re: Auto-execute code at exit? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-12-15 23:20 +0000
                                                                    Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-16 00:36 +0100
                                                                    Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-16 01:34 +0000
                                                                      Re: Auto-execute code at exit? Manfred <noname@invalid.add> - 2017-12-16 20:06 +0100
                                                                      Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-17 17:33 +0100
                                                                        Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-17 21:35 +0000
                                                                          Re: Auto-execute code at exit? Keith Thompson <kst-u@mib.org> - 2017-12-17 15:06 -0800
                                                                            Re: Auto-execute code at exit? Ian Collins <ian-news@hotmail.com> - 2017-12-18 12:41 +1300
                                                                              Re: Auto-execute code at exit? Robert Wessel <robertwessel2@yahoo.com> - 2017-12-18 03:36 -0600
                                                                                Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-18 11:51 +0100
                                                                            Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-18 12:02 +0000
                                                                              Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-18 12:43 +0000
                                                                                Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-18 15:07 +0100
                                                                                  Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-18 16:07 +0000
                                                                                    Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-18 20:50 +0100
                                                                              Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-18 13:57 +0100
                                                                                Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-18 15:36 +0000
                                                                                  Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-18 21:04 +0100
                                                                                Re: Auto-execute code at exit? Keith Thompson <kst-u@mib.org> - 2017-12-18 09:08 -0800
                                                                                  Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-18 20:51 +0100
                                                                              Re: Auto-execute code at exit? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-12-18 15:37 +0000
                                                                                Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-18 16:28 +0000
                                                                                  Re: Auto-execute code at exit? Keith Thompson <kst-u@mib.org> - 2017-12-18 10:59 -0800
                                                                                    Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-18 19:35 +0000
                                                                                      Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-18 19:55 +0000
                                                                                        Re: Auto-execute code at exit? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-12-18 20:48 +0000
                                                                                          Re: Auto-execute code at exit? supercat@casperkitty.com - 2017-12-18 13:03 -0800
                                                                                            Re: Auto-execute code at exit? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-12-18 21:14 +0000
                                                                                          Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-19 00:08 +0000
                                                                                            Re: Auto-execute code at exit? Keith Thompson <kst-u@mib.org> - 2017-12-18 16:58 -0800
                                                                                              Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-19 01:28 +0000
                                                                                                Re: Auto-execute code at exit? Ian Collins <ian-news@hotmail.com> - 2017-12-19 14:35 +1300
                                                                                                  Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-19 01:45 +0000
                                                                                            Re: Auto-execute code at exit? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-12-19 01:49 +0000
                                                                                              Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-19 02:54 +0000
                                                                                                Re: Auto-execute code at exit? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-12-19 14:45 +0000
                                                                                                  Re: Auto-execute code at exit? supercat@casperkitty.com - 2017-12-19 07:48 -0800
                                                                                                  Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-19 16:00 +0000
                                                                                                    Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-19 17:42 +0100
                                                                                                    Re: Auto-execute code at exit? scott@slp53.sl.home (Scott Lurndal) - 2017-12-19 17:19 +0000
                                                                                                      Re: Auto-execute code at exit? Keith Thompson <kst-u@mib.org> - 2017-12-19 09:43 -0800
                                                                                                        Re: Auto-execute code at exit? scott@slp53.sl.home (Scott Lurndal) - 2017-12-19 18:57 +0000
                                                                                                    Re: Auto-execute code at exit? Keith Thompson <kst-u@mib.org> - 2017-12-19 09:33 -0800
                                                                                                      Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-19 18:34 +0000
                                                                                                    Re: Auto-execute code at exit? supercat@casperkitty.com - 2017-12-19 11:05 -0800
                                                                                      Re: Auto-execute code at exit? Manfred <noname@invalid.add> - 2017-12-18 21:09 +0100
                                                                                        Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-18 20:38 +0000
                                                                                      Re: Auto-execute code at exit? Ian Collins <ian-news@hotmail.com> - 2017-12-19 13:35 +1300
                                                                                        Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-19 01:00 +0000
                                                                                          Re: Auto-execute code at exit? Ian Collins <ian-news@hotmail.com> - 2017-12-19 14:04 +1300
                                                                                            Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-20 13:42 +0000
                                                                                              Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-20 15:52 +0100
                                                                                                Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-20 15:42 +0000
                                                                                                Re: Auto-execute code at exit? supercat@casperkitty.com - 2017-12-20 08:16 -0800
                                                                                                  Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-20 18:25 +0100
                                                                                                    Re: Auto-execute code at exit? supercat@casperkitty.com - 2017-12-20 10:48 -0800
                                                                                                      Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-20 20:43 +0100
                                                                                                        Re: Auto-execute code at exit? supercat@casperkitty.com - 2017-12-20 12:44 -0800
                                                                                                          Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-21 15:18 +0100
                                                                                                            Re: Auto-execute code at exit? supercat@casperkitty.com - 2017-12-21 09:45 -0800
                                                                                                              Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-21 20:08 +0100
                                                                                                                Re: Auto-execute code at exit? supercat@casperkitty.com - 2017-12-21 12:33 -0800
                                                                                                                  Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-21 22:42 +0100
                                                                                                                    Re: Auto-execute code at exit? supercat@casperkitty.com - 2017-12-21 15:20 -0800
                                                                                                                      Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-22 09:57 +0100
                                                                                                                        Re: Auto-execute code at exit? supercat@casperkitty.com - 2017-12-22 08:21 -0800
                                                                                                                          Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-23 13:32 +0100
                                                                                                                            Re: Auto-execute code at exit? Gareth Owen <gwowen@gmail.com> - 2017-12-23 19:35 +0000
                                                                                                                            Re: Auto-execute code at exit? supercat@casperkitty.com - 2017-12-26 12:08 -0800
                                                                                                                              Re: Auto-execute code at exit? Keith Thompson <kst-u@mib.org> - 2017-12-26 12:36 -0800
                                                                                                                              Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-27 10:38 +0100
                                                                                                                                Re: Auto-execute code at exit? supercat@casperkitty.com - 2017-12-27 08:14 -0800
                                                                                                                              Re: Auto-execute code at exit? Richard Damon <Richard@Damon-Family.org> - 2017-12-27 09:50 -0500
                                                                                                      Re: Auto-execute code at exit? Keith Thompson <kst-u@mib.org> - 2017-12-20 12:12 -0800
                                                                                                Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-20 18:16 +0000
                                                                                                  Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-20 19:41 +0100
                                                                                                    Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-20 22:52 +0000
                                                                                                      Re: Auto-execute code at exit? Keith Thompson <kst-u@mib.org> - 2017-12-20 15:39 -0800
                                                                                                        Re: Auto-execute code at exit? Ian Collins <ian-news@hotmail.com> - 2017-12-21 13:02 +1300
                                                                                                        Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-21 00:50 +0000
                                                                                                          Re: Auto-execute code at exit? Keith Thompson <kst-u@mib.org> - 2017-12-20 18:22 -0800
                                                                                                            Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-21 12:10 +0000
                                                                                                              Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-21 13:10 +0000
                                                                                                                Re: Auto-execute code at exit? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-12-21 20:55 +0000
                                                                                                                  Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-21 21:37 +0000
                                                                                                                    Re: Auto-execute code at exit? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-12-22 01:50 +0000
                                                                                                                      Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-22 12:14 +0000
                                                                                                                        Re: Auto-execute code at exit? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-12-22 17:01 +0000
                                                                                                                          Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-22 17:34 +0000
                                                                                                                            Re: Auto-execute code at exit? supercat@casperkitty.com - 2017-12-22 09:52 -0800
                                                                                                                            Re: Auto-execute code at exit? Keith Thompson <kst-u@mib.org> - 2017-12-22 12:02 -0800
                                                                                                                              Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-22 20:18 +0000
                                                                                                                                Re: Auto-execute code at exit? Keith Thompson <kst-u@mib.org> - 2017-12-22 12:39 -0800
                                                                                                                                  Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-22 23:10 +0000
                                                                                                                                    Re: Auto-execute code at exit? Keith Thompson <kst-u@mib.org> - 2017-12-22 17:05 -0800
                                                                                                                                      Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-23 02:17 +0000
                                                                                                                                      Re: Auto-execute code at exit? Richard Damon <Richard@Damon-Family.org> - 2017-12-22 22:14 -0500
                                                                                                                                        Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-23 14:43 +0100
                                                                                                                                      Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-23 14:31 +0100
                                                                                                                                        Re: Auto-execute code at exit? Ian Collins <ian-news@hotmail.com> - 2017-12-24 09:45 +1300
                                                                                                                                    Re: Auto-execute code at exit? Ian Collins <ian-news@hotmail.com> - 2017-12-23 16:28 +1300
                                                                                                                                      Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-23 11:23 +0000
                                                                                                                                        Re: Auto-execute code at exit? Richard Damon <Richard@Damon-Family.org> - 2017-12-23 13:24 -0500
                                                                                                                                        Re: Auto-execute code at exit? Ian Collins <ian-news@hotmail.com> - 2017-12-24 09:29 +1300
                                                                                                              Re: Auto-execute code at exit? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-12-21 20:57 +0000
                                                                                                              Re: Auto-execute code at exit? Keith Thompson <kst-u@mib.org> - 2017-12-21 13:11 -0800
                                                                                                                Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-21 21:58 +0000
                                                                                                              Re: Auto-execute code at exit? jameskuyper@verizon.net - 2017-12-21 14:03 -0800
                                                                                                                Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-22 01:34 +0000
                                                                                                                  Re: Auto-execute code at exit? jameskuyper@verizon.net - 2017-12-22 07:55 -0800
                                                                                                                    Re: Auto-execute code at exit? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-12-22 16:41 +0000
                                                                                                                      Re: Auto-execute code at exit? "James R. Kuyper" <jameskuyper@verizon.net> - 2017-12-22 12:46 -0500
                                                                                                                        Re: Auto-execute code at exit? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-12-23 11:57 +0000
                                                                                                                          Re: Auto-execute code at exit? James Kuyper <jameskuyper@verizon.net> - 2017-12-23 08:12 -0500
                                                                                                                            Re: Auto-execute code at exit? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-12-23 21:02 +0000
                                                                                                                              Re: Auto-execute code at exit? James Kuyper <jameskuyper@verizon.net> - 2017-12-23 16:13 -0500
                                                                                                                                Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-23 22:15 +0000
                                                                                                                                  Re: Auto-execute code at exit? Keith Thompson <kst-u@mib.org> - 2017-12-23 14:45 -0800
                                                                                                                                    Re: Auto-execute code at exit? Keith Thompson <kst-u@mib.org> - 2017-12-23 15:47 -0800
                                                                                                                                    Re: Auto-execute code at exit? James Kuyper <jameskuyper@verizon.net> - 2017-12-23 19:34 -0500
                                                                                                                                      Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-24 12:08 +0000
                                                                                                                                        Re: Auto-execute code at exit? Melzzzzz <Melzzzzz@zzzzz.com> - 2017-12-24 12:11 +0000
                                                                                                                                          Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-24 12:17 +0000
                                                                                                                                            Re: Auto-execute code at exit? jameskuyper@verizon.net - 2017-12-24 05:49 -0800
                                                                                                                                            Re: Auto-execute code at exit? Keith Thompson <kst-u@mib.org> - 2017-12-24 13:06 -0800
                                                                                                                          Re: Auto-execute code at exit? Keith Thompson <kst-u@mib.org> - 2017-12-23 13:51 -0800
                                                                                                                            Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-23 22:17 +0000
                                                                                                                    Re: Auto-execute code at exit? Gareth Owen <gwowen@gmail.com> - 2017-12-22 18:37 +0000
                                                                                                                    Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-22 19:03 +0000
                                                                                              Re: Auto-execute code at exit? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-12-20 17:44 +0000
                                                                                          Re: Auto-execute code at exit? Keith Thompson <kst-u@mib.org> - 2017-12-18 17:22 -0800
                                                                                            Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-19 01:41 +0000
                                                                                              Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-19 09:54 +0100
                                                                                                Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-19 13:24 +0000
                                                                                                  Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-19 14:43 +0100
                                                                                                  Re: Auto-execute code at exit? Keith Thompson <kst-u@mib.org> - 2017-12-19 09:02 -0800
                                                                                    Re: Auto-execute code at exit? Manfred <noname@invalid.add> - 2017-12-18 20:58 +0100
                                                                                    Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-18 22:36 +0100
                                                                                  Re: Auto-execute code at exit? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-12-18 20:37 +0000
                                                                                Re: Auto-execute code at exit? Keith Thompson <kst-u@mib.org> - 2017-12-18 09:13 -0800
                                                                                  Re: Auto-execute code at exit? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-12-18 20:51 +0000
                                                                              Re: Auto-execute code at exit? Keith Thompson <kst-u@mib.org> - 2017-12-18 09:03 -0800
                                                                                Re: Auto-execute code at exit? Gareth Owen <gwowen@gmail.com> - 2017-12-18 19:13 +0000
                                                                                  Re: Auto-execute code at exit? Keith Thompson <kst-u@mib.org> - 2017-12-18 11:28 -0800
                                                                          Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-18 10:07 +0100
                                                                            Re: Auto-execute code at exit? supercat@casperkitty.com - 2017-12-18 07:50 -0800
                                                                  Re: Auto-execute code at exit? Ian Collins <ian-news@hotmail.com> - 2017-12-16 12:21 +1300
                                                          Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-15 09:51 +0100
                                                    Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-14 12:08 +0000
                                                  Re: Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-14 05:13 -0800
                                          Re: Auto-execute code at exit? Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2017-12-13 09:21 -0700
                                            Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-13 19:27 +0100
                                        Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-13 15:14 +0000
                                          Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-13 17:11 +0100
                              Re: Auto-execute code at exit? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-12-13 00:29 +0000
                                Re: Auto-execute code at exit? mark.bluemel@gmail.com - 2017-12-13 00:41 -0800
                                Re: Auto-execute code at exit? Gareth Owen <gwowen@gmail.com> - 2017-12-14 06:51 +0000
                                Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-14 14:40 +0000
                                  Re: Auto-execute code at exit? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-12-14 17:15 +0000
                                    Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-14 18:59 +0000
                  Re: Auto-execute code at exit? David Brown <david.brown@hesbynett.no> - 2017-12-12 09:48 +0100
              Re: Auto-execute code at exit? Melzzzzz <Melzzzzz@zzzzz.com> - 2017-12-11 17:40 +0000
                Re: Auto-execute code at exit? Keith Thompson <kst-u@mib.org> - 2017-12-11 10:57 -0800
      Re: Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-10 13:56 -0800
        Re: Auto-execute code at exit? David Kleinecke <dkleinecke@gmail.com> - 2017-12-10 14:09 -0800
          Re: Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-10 14:18 -0800
            Re: Auto-execute code at exit? asetofsymbols@gmail.com - 2017-12-10 14:51 -0800
              Re: Auto-execute code at exit? asetofsymbols@gmail.com - 2017-12-23 11:08 -0800
                Re: Auto-execute code at exit? asetofsymbols@gmail.com - 2017-12-25 00:49 -0800
      Re: Auto-execute code at exit? bartc <bc@freeuk.com> - 2017-12-11 00:29 +0000
      Re: Auto-execute code at exit? Gareth Owen <gwowen@gmail.com> - 2017-12-11 18:30 +0000
        Re: Auto-execute code at exit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-12-11 11:09 -0800
    Auto-execute code at exit? asetofsymbols@gmail.com - 2017-12-10 15:05 -0800
    Re: Auto-execute code at exit? mcheung63@gmail.com - 2017-12-24 21:04 -0800

Page 14 of 16 — ← Prev page 1 … 12 13 [14] 15 16  Next page →


#124628

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2017-12-23 21:02 +0000
Message-ID<874lohdupc.fsf@bsb.me.uk>
In reply to#124618
James Kuyper <jameskuyper@verizon.net> writes:

> On 12/23/2017 06:57 AM, Ben Bacarisse wrote:
>> "James R. Kuyper" <jameskuyper@verizon.net> writes:
> ...
>>> I'll grant you that pointers might contain an
>>> encoded form of the address, and the encoding might be different for
>>> pointers to different types, such as &s and &s[0], but I'd normally
>>> expect that the address being encoded would be the equivalent.
>> 
>> Right, but that's a philosophical point about what these two
>> representations mean.  I don't think bartc (nor quite a few other
>> readers) would say that two very different-looking addresses were in
>> fact "the same address".  bartc used the term "the same address" to
>> explain why the code above is OK, so at the very least you need to use
>> different words to explain why it won't work despite the addresses being
>> "the same".
>
> I would say that what he's trying to do is not guaranteed to work
> because the two addresses, while guaranteed by the standard to be
> equivalent, are not necessarily the same address

OK, but now I'm baffled why you said "That's entirely correct" when
bartc said the two addresses "are going to be exactly the same address".

Anyway, I don't think there is any matter of fact we disagree on here.

<text removed>
-- 
Ben.

[toc] | [prev] | [next] | [standalone]


#124629

FromJames Kuyper <jameskuyper@verizon.net>
Date2017-12-23 16:13 -0500
Message-ID<p1mgu4$1iv$1@dont-email.me>
In reply to#124628
On 12/23/2017 04:02 PM, Ben Bacarisse wrote:
> James Kuyper <jameskuyper@verizon.net> writes:
> 
>> On 12/23/2017 06:57 AM, Ben Bacarisse wrote:
>>> "James R. Kuyper" <jameskuyper@verizon.net> writes:
>> ...
>>>> I'll grant you that pointers might contain an
>>>> encoded form of the address, and the encoding might be different for
>>>> pointers to different types, such as &s and &s[0], but I'd normally
>>>> expect that the address being encoded would be the equivalent.
>>>
>>> Right, but that's a philosophical point about what these two
>>> representations mean.  I don't think bartc (nor quite a few other
>>> readers) would say that two very different-looking addresses were in
>>> fact "the same address".  bartc used the term "the same address" to
>>> explain why the code above is OK, so at the very least you need to use
>>> different words to explain why it won't work despite the addresses being
>>> "the same".
>>
>> I would say that what he's trying to do is not guaranteed to work
>> because the two addresses, while guaranteed by the standard to be
>> equivalent, are not necessarily the same address
> 
> OK, but now I'm baffled why you said "That's entirely correct" when
> bartc said the two addresses "are going to be exactly the same address".

Because addresses that are equivalent rather than being exactly the same
would have been sufficient to make his code work as intended, if it
hadn't been for the fact that they had incompatible types. That's what
"equivalent" means in this context. If the addresses had been identical,
and not merely equivalent, the fact that they had incompatible types
would still have been sufficient to be problematic. I was trying to
redirect his attention away from an irrelevancy to the real issue.

[toc] | [prev] | [next] | [standalone]


#124632

Frombartc <bc@freeuk.com>
Date2017-12-23 22:15 +0000
Message-ID<CzA%B.133627$pC5.41377@fx41.am4>
In reply to#124629
On 23/12/2017 21:13, James Kuyper wrote:
> On 12/23/2017 04:02 PM, Ben Bacarisse wrote:
>> James Kuyper <jameskuyper@verizon.net> writes:
>>
>>> On 12/23/2017 06:57 AM, Ben Bacarisse wrote:
>>>> "James R. Kuyper" <jameskuyper@verizon.net> writes:
>>> ...
>>>>> I'll grant you that pointers might contain an
>>>>> encoded form of the address, and the encoding might be different for
>>>>> pointers to different types, such as &s and &s[0], but I'd normally
>>>>> expect that the address being encoded would be the equivalent.
>>>>
>>>> Right, but that's a philosophical point about what these two
>>>> representations mean.  I don't think bartc (nor quite a few other
>>>> readers) would say that two very different-looking addresses were in
>>>> fact "the same address".  bartc used the term "the same address" to
>>>> explain why the code above is OK, so at the very least you need to use
>>>> different words to explain why it won't work despite the addresses being
>>>> "the same".
>>>
>>> I would say that what he's trying to do is not guaranteed to work
>>> because the two addresses, while guaranteed by the standard to be
>>> equivalent, are not necessarily the same address
>>
>> OK, but now I'm baffled why you said "That's entirely correct" when
>> bartc said the two addresses "are going to be exactly the same address".
> 
> Because addresses that are equivalent rather than being exactly the same
> would have been sufficient to make his code work as intended, if it
> hadn't been for the fact that they had incompatible types.

How does it work here:

   char s[20];

   printf("%p\n", s);
   printf("%p\n", &s[0]);

Each line has an incompatible pointer type, yet the same address, of 
whatever type, can be converted to the representation of a pointer.

How can this be done if, for example, those two types of pointers were 
very different?

The difference is that inside the implementation of printf, the address 
is processed for %s rather than for %p.

It seems to me that for a variadic argument, any pointer value can be 
considered to be notionally cast to void*, and then cast back into a 
pointer to a concrete type, as needed inside printf.


-- 
bartc

[toc] | [prev] | [next] | [standalone]


#124634

FromKeith Thompson <kst-u@mib.org>
Date2017-12-23 14:45 -0800
Message-ID<lnmv29gj1l.fsf@kst-u.example.com>
In reply to#124632
bartc <bc@freeuk.com> writes:
[...]
> How does it work here:
>
>    char s[20];
>
>    printf("%p\n", s);
>    printf("%p\n", &s[0]);
>
> Each line has an incompatible pointer type, yet the same address, of 
> whatever type, can be converted to the representation of a pointer.

%p requires an argument of type void*.  s and &s[0] are both of type
char* (for s, after the implicit conversion).  The standard makes
special guarantees about the relationship beween void* and char*.

I'm not 100% certain that those guarantees are sufficient to define the
behavior.  If you're curious, look it up.  I'd use a (void*) cast
myself.

> How can this be done if, for example, those two types of pointers were 
> very different?

In this case, they can't be "very different".

> The difference is that inside the implementation of printf, the address 
> is processed for %s rather than for %p.
>
> It seems to me that for a variadic argument, any pointer value can be 
> considered to be notionally cast to void*, and then cast back into a 
> pointer to a concrete type, as needed inside printf.

No such cast (or conversion) is performed.

From your followup:

> As in my other post, how would that work with: printf("%p", ptr_value)?

If ptr_value is of type void* or of some character pointer type, there's
no problem.  If ptr_value is of some other pointer type, the behavior is
undefined.  The most common result is that the pointer value is printed
as if it had been explicitly converted to void*, but other results are
possible.  The standard does not require a diagnostic.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

[toc] | [prev] | [next] | [standalone]


#124635

FromKeith Thompson <kst-u@mib.org>
Date2017-12-23 15:47 -0800
Message-ID<lnincxgg5w.fsf@kst-u.example.com>
In reply to#124634
Keith Thompson <kst-u@mib.org> writes:
> bartc <bc@freeuk.com> writes:
> [...]
>> How does it work here:
>>
>>    char s[20];
>>
>>    printf("%p\n", s);
>>    printf("%p\n", &s[0]);
>>
>> Each line has an incompatible pointer type, yet the same address, of 
>> whatever type, can be converted to the representation of a pointer.
>
> %p requires an argument of type void*.  s and &s[0] are both of type
> char* (for s, after the implicit conversion).  The standard makes
> special guarantees about the relationship beween void* and char*.
>
> I'm not 100% certain that those guarantees are sufficient to define the
> behavior.  If you're curious, look it up.  I'd use a (void*) cast
> myself.

I was curious, so I looked it up.

N1570 6.2.5p28:

    A pointer to void shall have the same representation and alignment
    requirements as a pointer to a character type.

with a footnote:

    The same representation and alignment requirements are meant to
    imply interchangeability as arguments to functions, return values
    from functions, and members of unions.

If we rely on the footnote, printf("%p\n", "foo") is safe and
equivalent to printf("%p\n", (void*)"foo").  But footnotes are
non-normative, so an implementation *could* in priciple make them
work differently.  Personally, as I said, I'd use a (void*) cast
just to avoid any ambiguity.

As usual, bartc will assert that I'm saying the standard is
flawless and fail to distinguish between describing the standard
and defending it.  In fact, I think this guarantee should be made
in normative text.  But adding a (void*) cast is so easy that I'm
not going to worry about it.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

[toc] | [prev] | [next] | [standalone]


#124637

FromJames Kuyper <jameskuyper@verizon.net>
Date2017-12-23 19:34 -0500
Message-ID<p1msn6$f20$1@dont-email.me>
In reply to#124634
On 12/23/2017 05:45 PM, Keith Thompson wrote:
> bartc <bc@freeuk.com> writes:
> [...]
>> How does it work here:
>>
>>    char s[20];
>>
>>    printf("%p\n", s);
>>    printf("%p\n", &s[0]);
>>
>> Each line has an incompatible pointer type, yet the same address, of 
>> whatever type, can be converted to the representation of a pointer.
...
>> How can this be done if, for example, those two types of pointers were 
>> very different?
> 
> In this case, they can't be "very different".

Yes - the incompatible pointers I was talking about were &s and &s[0].
In this context, s gets implicitly converted to a pointer of exactly the
same type as &s[0].

[toc] | [prev] | [next] | [standalone]


#124640

Frombartc <bc@freeuk.com>
Date2017-12-24 12:08 +0000
Message-ID<BMM%B.94884$vp1.387@fx47.am4>
In reply to#124637
On 24/12/2017 00:34, James Kuyper wrote:
> On 12/23/2017 05:45 PM, Keith Thompson wrote:
>> bartc <bc@freeuk.com> writes:
>> [...]
>>> How does it work here:
>>>
>>>     char s[20];
>>>
>>>     printf("%p\n", s);
>>>     printf("%p\n", &s[0]);
>>>
>>> Each line has an incompatible pointer type, yet the same address, of
>>> whatever type, can be converted to the representation of a pointer.
> ...
>>> How can this be done if, for example, those two types of pointers were
>>> very different?
>>
>> In this case, they can't be "very different".
> 
> Yes - the incompatible pointers I was talking about were &s and &s[0].
> In this context, s gets implicitly converted to a pointer of exactly the
> same type as &s[0].
> 

What context is that? And would it be different here:

   char s[10];
   int prnitf(char*, ...);

   prnitf("%S\N", &s[0]);
   prnitf("%S\N", &s);

or here:

   printf("%s\n", &s[0]);
   printf("%s\n", &s);

-- 
bartc

[toc] | [prev] | [next] | [standalone]


#124641

FromMelzzzzz <Melzzzzz@zzzzz.com>
Date2017-12-24 12:11 +0000
Message-ID<p1o5h5$co4$5@news.albasani.net>
In reply to#124640
On 2017-12-24, bartc <bc@freeuk.com> wrote:
> On 24/12/2017 00:34, James Kuyper wrote:
>> On 12/23/2017 05:45 PM, Keith Thompson wrote:
>>> bartc <bc@freeuk.com> writes:
>>> [...]
>>>> How does it work here:
>>>>
>>>>     char s[20];
>>>>
>>>>     printf("%p\n", s);
>>>>     printf("%p\n", &s[0]);
>>>>
>>>> Each line has an incompatible pointer type, yet the same address, of
>>>> whatever type, can be converted to the representation of a pointer.
>> ...
>>>> How can this be done if, for example, those two types of pointers were
>>>> very different?
>>>
>>> In this case, they can't be "very different".
>> 
>> Yes - the incompatible pointers I was talking about were &s and &s[0].
>> In this context, s gets implicitly converted to a pointer of exactly the
>> same type as &s[0].
>> 
>
> What context is that? And would it be different here:
>
>    char s[10];
>    int prnitf(char*, ...);
>
>    prnitf("%S\N", &s[0]);
>    prnitf("%S\N", &s);
>
> or here:
>
>    printf("%s\n", &s[0]);
>    printf("%s\n", &s);
>
Escuse me, but &s is address of array and &s[0] is address of first
element? I have never used &s , but just `s` as array is implicitely
converted to pointer to first element...

-- 
press any key to continue or any other to quit...

[toc] | [prev] | [next] | [standalone]


#124642

Frombartc <bc@freeuk.com>
Date2017-12-24 12:17 +0000
Message-ID<vVM%B.95355$vp1.78129@fx47.am4>
In reply to#124641
On 24/12/2017 12:11, Melzzzzz wrote:
> On 2017-12-24, bartc <bc@freeuk.com> wrote:
>> On 24/12/2017 00:34, James Kuyper wrote:

>>> Yes - the incompatible pointers I was talking about were &s and &s[0].
>>> In this context, s gets implicitly converted to a pointer of exactly the
>>> same type as &s[0].
>>>
>>
>> What context is that? And would it be different here:

> Escuse me, but &s is address of array and &s[0] is address of first
> element? I have never used &s , but just `s` as array is implicitely
> converted to pointer to first element...

Oh, OK. I was assuming that here:

"Yes - the incompatible pointers I was talking about were &s and &s[0]. 
In this context, s gets implicitly converted..."

the latter "s" was implicitly referring to the same "&s" just mentioned, 
and that that somehow was converted, thanks to some magic going in with 
variadic functions, to be the same as &s[0].

-- 
bart

[toc] | [prev] | [next] | [standalone]


#124646

Fromjameskuyper@verizon.net
Date2017-12-24 05:49 -0800
Message-ID<5a0a9055-10d4-412f-a685-a5631c0cc6a3@googlegroups.com>
In reply to#124642
On Sunday, December 24, 2017 at 7:17:39 AM UTC-5, Bart wrote:
> On 24/12/2017 12:11, Melzzzzz wrote:
> > On 2017-12-24, bartc <bc@freeuk.com> wrote:
> >> On 24/12/2017 00:34, James Kuyper wrote:
> 
> >>> Yes - the incompatible pointers I was talking about were &s and &s[0].
> >>> In this context, s gets implicitly converted to a pointer of exactly the
> >>> same type as &s[0].
> >>>
> >>
> >> What context is that? And would it be different here:
> 
> > Escuse me, but &s is address of array and &s[0] is address of first
> > element? I have never used &s , but just `s` as array is implicitely
> > converted to pointer to first element...
> 
> Oh, OK. I was assuming that here:
> 
> "Yes - the incompatible pointers I was talking about were &s and &s[0].

Looking back, I see that I was in error here. Those pointers are incompatible, but the incompatible pointers I was referring to appeared in your message with "Date: Thu, 21 Dec 2017 21:58:00 +0000", and in that message they were &s and s. In the context in which it occurred, s was equivalent to &s[0], but that's not what you actually wrote in that message.
 
> In this context, s gets implicitly converted..."

In that sentence, "this context" refers to the most recent message from you on this thread, the one with "Date: "Sat, 23 Dec 2017 22:15:59 +0000". It did not occur to me that you might think it referred to my own previous sentence, but after the fact I can see how you might reach that conclusion. I could have avoided confusion by reversing the order of those two sentences.

[toc] | [prev] | [next] | [standalone]


#124655

FromKeith Thompson <kst-u@mib.org>
Date2017-12-24 13:06 -0800
Message-ID<lna7y7hm4g.fsf@kst-u.example.com>
In reply to#124642
bartc <bc@freeuk.com> writes:
[...]
> the latter "s" was implicitly referring to the same "&s" just mentioned, 
> and that that somehow was converted, thanks to some magic going in with 
> variadic functions, to be the same as &s[0].

The implicit conversion (compile-time adjustment) of an array expression
to a pointer expression has nothing to do with variadic functions.  See
N1570 6.3.2.1p3.  (That paragraph has a minor error, not relevant to the
current discussion, in referring to the _Alignof operator, corrected in
the published standard.)

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

[toc] | [prev] | [next] | [standalone]


#124631

FromKeith Thompson <kst-u@mib.org>
Date2017-12-23 13:51 -0800
Message-ID<lnr2rlglkg.fsf@kst-u.example.com>
In reply to#124616
Ben Bacarisse <ben.usenet@bsb.me.uk> writes:
[...]
> printf does not do a conversion from one type to another.  It takes the
> bits of the passed pointer and interprets them as being a
> representation of a pointer of the required type.
[...]

The standard doesn't even guarantee that much.  I expect that most
implementations of printf behave that way, but if the format and
the argument are inconsistent printf might not even have access to
the bits.

A plausible scenario: char* and char(*)[N] are represented
differently and are passed in different registers, or one is passed
in a register and the other in memory.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

[toc] | [prev] | [next] | [standalone]


#124633

Frombartc <bc@freeuk.com>
Date2017-12-23 22:17 +0000
Message-ID<IAA%B.133628$pC5.14819@fx41.am4>
In reply to#124631
On 23/12/2017 21:51, Keith Thompson wrote:
> Ben Bacarisse <ben.usenet@bsb.me.uk> writes:
> [...]
>> printf does not do a conversion from one type to another.  It takes the
>> bits of the passed pointer and interprets them as being a
>> representation of a pointer of the required type.
> [...]
> 
> The standard doesn't even guarantee that much.  I expect that most
> implementations of printf behave that way, but if the format and
> the argument are inconsistent printf might not even have access to
> the bits.
> 
> A plausible scenario: char* and char(*)[N] are represented
> differently and are passed in different registers, or one is passed
> in a register and the other in memory.

As in my other post, how would that work with: printf("%p", ptr_value)?

[toc] | [prev] | [next] | [standalone]


#124601

FromGareth Owen <gwowen@gmail.com>
Date2017-12-22 18:37 +0000
Message-ID<87mv2a7gob.fsf@gmail.com>
In reply to#124592
jameskuyper@verizon.net writes:


> As long as you're certain that neither of those issues will ever come
> up on any of the systems you intend to use to translate this C code,
> you're free to ignore those warnings, but it's so simple to do this
> right that I don't see why you'd bother deliberately doing it wrong.

Hanlon's Razor applies.

[toc] | [prev] | [next] | [standalone]


#124602

Frombartc <bc@freeuk.com>
Date2017-12-22 19:03 +0000
Message-ID<dFc%B.38945$ba4.1113@fx24.am4>
In reply to#124592
On 22/12/2017 15:55, jameskuyper@verizon.net wrote:
> On Thursday, December 21, 2017 at 8:33:23 PM UTC-5, Bart wrote:

> But C pointers have not only an address, but also a type, and pointers to
> different types can have different representations. They can even be passed
> using different mechanisms when calling a function. As long as you're certain
> that neither of those issues will ever come up on any of the systems you intend
> to use to translate this C code, you're free to ignore those warnings, but it's
> so simple to do this right that I don't see why you'd bother deliberately doing
> it wrong.

It's not that simple. In the case of clock(), it apparently has a type 
that is variable across OSes.

Also I don't want to have to kowtow to C to that extent.

Suppose I have a binary function F in a library, written in language X.

I want to call F from a program in language X. Or maybe they are X and Y.

Currently X is compiled to ASM, and that ASM calls F. Everything works 
perfectly; F expects the address of some block of bytes, and that is 
exactly what the program provides.

But then I want to go through C instead, perhaps for a bit of extra 
speed via its optimising compiler.

Now, however, everything has to be just so. You can't just have the 
address of a block of bytes, you either have the address of one byte, or 
the address of the whole block, as they are apparently different.

(Even though, when C has an array of bytes and you want to pass a 
pointer to the array, you generally pass the address of the first byte. 
And the receiving can choose to cast the latter to the address of the 
array, so the information is there.)

But it is quite a lot of work to try to get this right so that either 
the C compiler shuts up about a lot of harmless warnings, or doesn't 
gets the idea that I'm invoking undefined behaviour and then doesn't do 
what I want or does something I don't want.

> Right - so why are you print p->uvalue with a "%f", instead of p->xvalue, which
> would be the correct one to use?

That was a mistake (although it gives the right result here).

It's a mistake due to my decision to use C library function that allows 
such mistakes.

> It's literally a single character correction.
> Your insistence on printing the wrong member of the union baffles me.

Who's insisting? I changed it. But you're thinking of short term fixes.

I've decided I won't use printf family functions of C in the user-code 
of a non-C language (except for a quick sneaky call when no-one's looking).

Because I'm concerned about introducing the problems of C's format 
system into my own non-C programs, where there is no way of checking the 
format. It can cause errors (as it has, otherwise there wouldn't be this 
subthread.)

-- 
bartc

[toc] | [prev] | [next] | [standalone]


#124528

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2017-12-20 17:44 +0000
Message-ID<87o9mtgupv.fsf@bsb.me.uk>
In reply to#124523
bartc <bc@freeuk.com> writes:
>   > mc /c64 hello
>
>   > gcc -c -std=c11 -pedantic -Wall -Wno-missing-braces -Wextra
>    -Wno-missing-field-initializers -Wformat=2 -Wswitch-default
>    -Wswitch-enum -Wcast-align -Wpointer-arith -Wbad-function-cast
>    -Wstrict-overflow=5 -Wstrict-prototypes -Winline -Wundef
>    -Wnested-externs -Wcast-qual -Wshadow -Wunreachable-code
>    -Wlogical-op -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls
>    -Wold-style-definition -Werror -ggdb3 -O3 -fno-omit-frame-pointer
>    -ffloat-store -fno-common -fstrict-aliasing

Why do you want all those warnings on generated code?  There are a few
non-warning flags at the end but even those look redundant but maybe you
know you generate C that, for example, breaks the effective type rules

-- 
Ben.

[toc] | [prev] | [next] | [standalone]


#124499

FromKeith Thompson <kst-u@mib.org>
Date2017-12-18 17:22 -0800
Message-ID<lnpo7bjyv4.fsf@kst-u.example.com>
In reply to#124497
bartc <bc@freeuk.com> writes:
[...]
> I'm not gcc-centric. If I use that compiler, it will be with the
> absolute minimal set of options.

I've written and deleted several responses to that paragraph.
I am speechless.

<snip>

> In fact, I've just spent a few minutes doing exactly that with my C
> compiler: by default, a () parameter list is illegal. It's necessary
> to use an option (-old) to help compile existing code when it is not
> practical to update it.

So your C compiler is non-conforming by default.  Fascinating.

<snip>

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

[toc] | [prev] | [next] | [standalone]


#124502

Frombartc <bc@freeuk.com>
Date2017-12-19 01:41 +0000
Message-ID<46_ZB.22969$Jg1.16854@fx33.am4>
In reply to#124499
On 19/12/2017 01:22, Keith Thompson wrote:
> bartc <bc@freeuk.com> writes:
> [...]
>> I'm not gcc-centric. If I use that compiler, it will be with the
>> absolute minimal set of options.
> 
> I've written and deleted several responses to that paragraph.
> I am speechless.
> 
> <snip>
> 
>> In fact, I've just spent a few minutes doing exactly that with my C
>> compiler: by default, a () parameter list is illegal. It's necessary
>> to use an option (-old) to help compile existing code when it is not
>> practical to update it.
> 
> So your C compiler is non-conforming by default.  Fascinating.

Umm -- isn't gcc as well?

Practically every complaint I make about C, David Brown comes up with 
some obscure option of gcc to fix it or detect it.

Which suggests that used in default mode, gcc is pretty much useless, as 
many things are not detected, or just result in warnings.

So isn't it better that with default options, it is in fail-safe mode in 
detecting and reporting the most obvious errors as actual errors?

And nobody has yet explained to me why the same fragment code being 
compiled variously as OK/WARNING/ERROR does any good at all.


bart

[toc] | [prev] | [next] | [standalone]


#124506

FromDavid Brown <david.brown@hesbynett.no>
Date2017-12-19 09:54 +0100
Message-ID<p1ak4h$4ii$1@dont-email.me>
In reply to#124502
On 19/12/17 02:41, bartc wrote:
> On 19/12/2017 01:22, Keith Thompson wrote:
>> bartc <bc@freeuk.com> writes:
>> [...]
>>> I'm not gcc-centric. If I use that compiler, it will be with the
>>> absolute minimal set of options.
>>
>> I've written and deleted several responses to that paragraph.
>> I am speechless.
>>
>> <snip>
>>
>>> In fact, I've just spent a few minutes doing exactly that with my C
>>> compiler: by default, a () parameter list is illegal. It's necessary
>>> to use an option (-old) to help compile existing code when it is not
>>> practical to update it.
>>
>> So your C compiler is non-conforming by default.  Fascinating.
> 
> Umm -- isn't gcc as well?

Of course it is.  Almost every C compiler is non-conforming by default,
in at least some ways.  Most, however, are extra permissive - they
accept correct code unless it happens to conflict with one of their
extensions (like defining an identifier that matches an extension
keyword).  Non-conformance is often shown in being /too/ accepting, and
failing to give required diagnostics.

Your compiler here is unusual in rejecting valid, legal, correct C code
by default - simply because it is poor style, hard to check, and an
obsolete feature.  I don't think that is necessarily a bad thing, but it
depends on the expected use of your tool - it is no good if people
expect to be able to take old but valid code and compile it, but it
could be helpful for people writing new code.

> 
> Practically every complaint I make about C, David Brown comes up with
> some obscure option of gcc to fix it or detect it.

Forgive me for trying to be helpful and teach you something.  Hopefully
others reading this newsgroup may find it useful to learn something
about C and/or C compilers.  And while this is not in any way a gcc
newsgroup, that compiler is used by many people - I have had feedback
from people that appreciate such information.  (There are also others
here who are better qualified in giving details of standard C behaviour,
so that part is covered too.)

And while some of the options I tell you about may be a little obscure,
most are not - and all are clearly documented in obvious places.  (gcc
also has some really obscure options, but I they are not relevant here.)

> 
> Which suggests that used in default mode, gcc is pretty much useless, as
> many things are not detected, or just result in warnings.

Many people find it very useful in its default mode.  But gcc has a wide
selection of options precisely because people use it in widely different
ways for widely different things.

If you are taking an existing correct C program, and simply want to
build a binary out of it, then you will be looking at options such as
-O2 for optimisation, -o program to give it a name, -march=native to
tune it to your computer.

If you are writing your own code, you will likely want lots of warnings
enabled, such as -Wall -Wextra -Wstrict-prototypes (I have a long list
of the ones I use - you would not like them all because some are tuned
to the style I use).

If you are running the code under a debugger, you will want -g and
perhaps -Og.

If you are doing performance analysis, you will want other options.

And so on.


People write C in different styles, for different purposes.  A compiler
like gcc tries to support them /all/, and does a fine (but certainly not
perfect) job of it - but /you/ have to work with the compiler to tell it
what you want from it.



Part of your trouble, I think, is that you have written your little toy
C compiler and you think that is all there is to it.  You have moulded a
rock to fit your hand and are using it to bash nails into wood - and
fail to understand that other people might want a toolbox full of
different tools for related purposes.  The tool at the top happens to be
a screwdriver, and not ideal for bashing nails - you are then condemning
the whole toolbox.


> 
> So isn't it better that with default options, it is in fail-safe mode in
> detecting and reporting the most obvious errors as actual errors?
> 
> And nobody has yet explained to me why the same fragment code being
> compiled variously as OK/WARNING/ERROR does any good at all.
> 

Actually, several people (including me) /have/ explained many times.
But you have not listened - you don't want to hear explanations, you
want to rant.

[toc] | [prev] | [next] | [standalone]


#124507

Frombartc <bc@freeuk.com>
Date2017-12-19 13:24 +0000
Message-ID<5p8_B.22454$oi6.4226@fx40.am4>
In reply to#124506
On 19/12/2017 08:54, David Brown wrote:
> On 19/12/17 02:41, bartc wrote:
>> On 19/12/2017 01:22, Keith Thompson wrote:

>>> So your C compiler is non-conforming by default.  Fascinating.
>>
>> Umm -- isn't gcc as well?
> 
> Of course it is.

So what's Keith on about then?

> Your compiler here is unusual in rejecting valid, legal, correct C code
> by default - simply because it is poor style, hard to check, and an
> obsolete feature.  I don't think that is necessarily a bad thing, but it
> depends on the expected use of your tool - it is no good if people
> expect to be able to take old but valid code and compile it, but it
> could be helpful for people writing new code.

If I want to compile Small C, then I can do it like this:

    mcc smlrc

if I change the handful of occurrences of T fn() {...} to T fn(void) 
{...}. Otherwise, to keep the source unchanged (or to avoid having to 
change it for each fresh download), it's:

    mcc -old smlrc

But many obsolete features it will not support at all, such as implicit 
functions, except with a special option - use a different compiler.

----------------------------------------
Dealing with () paramlists to use mcc without -old option:

(1) Used in T func() {...}

Change to T func(void) {...}

(2) Using void (fnptr*)() as a generic function pointer

Use instead 'void (fnptr*)(void)', or possibly 'void (fnptr*)(struct 
{})'. Or equivalent code that will work with other compilers.

(3) Using T func() to allow calls to func with unchecked arguments. (Can 
be same argument numbers and types each time or different.)

For mcc, use instead T func(...).

(On other compilers, ... may need at least one normal parameter. This is 
necessary for variadic arguments, but it is expected that the actual 
definition of func() is not variadic.)

(4) Using T func() when a proper definition/declaration of func is also 
visible.

Get rid of the unnecessary T func() declarations.
----------------------------------------

> And while some of the options I tell you about may be a little obscure,
> most are not - and all are clearly documented in obvious places.  (gcc
> also has some really obscure options, but I they are not relevant here.)

I don't believe in options except for the most basic such as -O3 or -E 
or -c to control aspects of the compilation process.

> Part of your trouble, I think, is that you have written your little toy
> C compiler and you think that is all there is to it.

It converts .c sources to .obj files. And does it without any fuss.

What else is there? You are obviously a power user and need all sorts of 
bells and whistles that others have no need for.

And when they do, to create a production version that runs at full speed 
for example, they can just run code through gcc -O3. But this is now 
working code which doesn't need all those extra options.

Or maybe someone might want to use the myriad options of gcc as a kind 
of lint. But most of the time they can use a nippy, lightweight 
compiler. (One which, if used by different people, is more likely to 
give the same behaviour on the same code because it doesn't allow each 
person to create their own dialect of C.)

-- 
bartc

[toc] | [prev] | [next] | [standalone]


Page 14 of 16 — ← Prev page 1 … 12 13 [14] 15 16  Next page →

Back to top | Article view | comp.lang.c


csiph-web