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


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

this girl calls c ugly

Started byfir <profesor.fir@gmail.com>
First post2026-05-27 19:53 +0200
Last post2026-05-30 11:18 +0200
Articles 20 on this page of 292 — 21 participants

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


Contents

  this girl calls c ugly fir <profesor.fir@gmail.com> - 2026-05-27 19:53 +0200
    Re: this girl calls c ugly fir <profesor.fir@gmail.com> - 2026-05-27 20:15 +0200
      Re: this girl calls c ugly BGB <cr88192@gmail.com> - 2026-05-27 18:49 -0500
        Re: this girl calls c ugly Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-05-28 04:53 +0000
          Re: this girl calls c ugly BGB <cr88192@gmail.com> - 2026-05-28 02:35 -0500
            Re: this girl calls c ugly Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-05-28 23:32 +0000
              Re: this girl calls c ugly BGB <cr88192@gmail.com> - 2026-05-28 20:07 -0500
          Re: this girl calls c ugly Bonita Montero <Bonita.Montero@gmail.com> - 2026-05-28 11:48 +0200
        Re: this girl calls c ugly Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-05-28 09:18 +0200
          Re: this girl calls c ugly BGB <cr88192@gmail.com> - 2026-05-28 04:57 -0500
            Re: this girl calls c ugly Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-05-28 23:35 +0000
            Re: this girl calls c ugly Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-05-29 09:52 +0200
              Re: this girl calls c ugly BGB <cr88192@gmail.com> - 2026-05-29 05:20 -0500
                Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-05-29 13:22 +0200
                  Re: this girl calls c ugly BGB <cr88192@gmail.com> - 2026-05-29 15:16 -0500
                    Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-05-30 13:52 +0200
                      Re: this girl calls c ugly Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-05-30 14:40 +0200
                        Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-05-30 16:36 +0200
                      Re: this girl calls c ugly BGB <cr88192@gmail.com> - 2026-05-30 15:48 -0500
                        Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-05-31 11:14 +0200
                          Re: this girl calls c ugly BGB <cr88192@gmail.com> - 2026-05-31 13:25 -0500
                            Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-05-31 22:14 +0200
                Re: this girl calls c ugly Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-05-29 15:22 +0200
                Re: this girl calls c ugly Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-05-30 03:49 +0000
          Re: this girl calls c ugly "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-05-28 12:47 -0700
            Re: this girl calls c ugly Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-05-29 09:56 +0200
              Re: this girl calls c ugly "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-05-29 11:00 -0700
        Re: this girl calls c ugly fir <profesor.fir@gmail.com> - 2026-05-28 17:12 +0200
          Re: this girl calls c ugly BGB <cr88192@gmail.com> - 2026-05-28 14:07 -0500
            Re: this girl calls c ugly Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-05-28 23:54 +0000
              Re: this girl calls c ugly Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-05-29 10:02 +0200
                Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-05-29 12:19 +0100
                  Re: this girl calls c ugly Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-05-29 14:46 +0200
                    Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-05-29 14:22 +0100
                      Re: this girl calls c ugly Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-05-29 17:15 +0200
                        Re: this girl calls c ugly scott@slp53.sl.home (Scott Lurndal) - 2026-05-29 15:59 +0000
                          Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-05-29 17:12 +0100
                            Re: this girl calls c ugly Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-05-29 18:48 +0200
                              Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-05-29 19:09 +0100
                                Re: this girl calls c ugly Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-05-29 22:00 +0200
                                  Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-05-29 22:14 +0100
                            Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-05-29 12:09 -0700
                        Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-05-29 17:05 +0100
                          Re: this girl calls c ugly Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-05-29 18:34 +0200
                      Re: this girl calls c ugly tTh <tth@none.invalid> - 2026-05-29 19:29 +0200
                        Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-05-29 18:53 +0100
                          Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-05-29 12:28 -0700
                            Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-05-29 20:49 +0100
                              Re: this girl calls c ugly Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-05-29 22:03 +0200
                              Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-05-29 13:56 -0700
                                Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-05-29 22:54 +0100
                                  Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-05-29 15:52 -0700
                                    Re: this girl calls c ugly James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-05-29 20:31 -0400
                                      Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-05-30 02:03 +0100
                                        Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-05-29 19:02 -0700
                                          Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-05-30 12:12 +0100
                                  Re: this girl calls c ugly cross@spitfire.i.gajendra.net (Dan Cross) - 2026-05-30 12:29 +0000
                                    Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-05-30 13:56 +0100
                                      Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-05-30 16:43 -0700
                                        Re: this girl calls c ugly Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-05-31 03:37 +0200
                                          Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-05-30 19:53 -0700
                                            Re: this girl calls c ugly Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-02 12:16 +0200
                                          Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-05-31 11:47 +0200
                                            Re: this girl calls c ugly Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-02 12:55 +0200
                                        Re: this girl calls c ugly Richard Harnden <richard.nospam@gmail.invalid> - 2026-05-31 09:12 +0100
                                          Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-05-31 11:49 +0200
                                            Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-05-31 11:10 +0100
                                              Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-05-31 13:18 +0200
                                                Re: this girl calls c ugly James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-05-31 10:24 -0400
                                                  Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-05-31 17:35 +0200
                                                    Re: this girl calls c ugly James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-05-31 12:46 -0400
                                                      Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-05-31 22:24 +0200
                                                        Re: this girl calls c ugly James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-05-31 18:26 -0400
                                                          Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-06-01 08:28 +0200
                                                    Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-05-31 15:54 -0700
                                                      Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-06-01 08:39 +0200
                                                        Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-01 02:33 -0700
                                                      Re: this girl calls c ugly Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-02 11:48 +0200
                                                        Re: this girl calls c ugly James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-06-02 06:37 -0400
                                                        Constants and undefined behavior Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-06-02 05:06 -0700
                                                          Re: Constants and undefined behavior cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-02 16:28 +0000
                                                            Re: Constants and undefined behavior Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-06-04 03:37 -0700
                                                              Re: Constants and undefined behavior cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-04 16:31 +0000
                                                                Re: Constants and undefined behavior Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-04 13:36 -0700
                                                                  Re: Constants and undefined behavior cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-04 23:49 +0000
                                                                    Re: Constants and undefined behavior Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-04 18:04 -0700
                                                                      Re: Constants and undefined behavior cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-06 03:10 +0000
                                                                        Re: Constants and undefined behavior Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-05 23:50 -0700
                                                                          Re: Constants and undefined behavior cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-08 02:20 +0000
                                                                            Re: Constants and undefined behavior Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-08 12:39 -0700
                                                                              Re: Constants and undefined behavior cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-08 23:15 +0000
                                                                                Re: Constants and undefined behavior Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-08 18:51 -0700
                                                                            Re: Constants and undefined behavior antispam@fricas.org (Waldek Hebisch) - 2026-06-09 01:25 +0000
                                                                      Re: Constants and undefined behavior Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-06-06 15:47 -0700
                                                                        Re: Constants and undefined behavior Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-06 16:36 -0700
                                                                          Re: Constants and undefined behavior Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-06-06 16:43 -0700
                                                                            Re: Constants and undefined behavior Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-06 17:41 -0700
                                                                    Re: Constants and undefined behavior Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-05 10:41 +0200
                                                                      Re: Constants and undefined behavior Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-05 10:49 -0700
                                                                      Re: Constants and undefined behavior Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-06-06 16:15 -0700
                                                                  Re: Constants and undefined behavior Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-06-06 18:06 -0700
                                                                    Re: Constants and undefined behavior Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-06-07 22:34 -0700
                                                                Re: Constants and undefined behavior Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-06-08 23:05 -0700
                                                        Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-02 05:35 -0700
                                                          Re: this girl calls c ugly Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-06-02 06:29 -0700
                                                            Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-06-02 16:10 +0200
                                                            Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-02 15:29 -0700
                                                              Re: this girl calls c ugly Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-06-05 06:41 -0700
                                                                Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-05 11:24 -0700
                                                                  Re: this girl calls c ugly Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-06-08 08:35 -0700
                                                                    Re: this girl calls c ugly cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-08 17:33 +0000
                                                                    Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-08 13:40 -0700
                                                                  Meaning of "expression" Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-08 14:05 -0700
                                                                Re: this girl calls c ugly cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-06 03:22 +0000
                                                                  Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-05 23:56 -0700
                                                                    Re: this girl calls c ugly cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-07 13:37 +0000
                                                                      Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-07 15:09 -0700
                                                                        Re: this girl calls c ugly cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-08 02:33 +0000
                                                                  Re: this girl calls c ugly Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-06-08 00:16 -0700
                                                                    Re: this girl calls c ugly cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-08 12:41 +0000
                                                                      Re: this girl calls c ugly cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-08 17:37 +0000
                                                      Re: this girl calls c ugly "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-06-02 13:59 -0700
                                              Re: this girl calls c ugly cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-02 13:05 +0000
                                                Parentheses (was: this girl calls c ugly) Bart <bc@freeuk.com> - 2026-06-02 14:38 +0100
                                                  Re: Parentheses (was: this girl calls c ugly) cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-02 15:19 +0000
                                                  Re: Parentheses antispam@fricas.org (Waldek Hebisch) - 2026-06-03 22:30 +0000
                                                    Re: Parentheses Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-03 16:24 -0700
                                                      Re: Parentheses antispam@fricas.org (Waldek Hebisch) - 2026-06-04 02:03 +0000
                                                    Re: Parentheses Bart <bc@freeuk.com> - 2026-06-04 01:12 +0100
                                                      Re: Parentheses antispam@fricas.org (Waldek Hebisch) - 2026-06-04 01:58 +0000
                                                        Re: Parentheses Bart <bc@freeuk.com> - 2026-06-04 11:37 +0100
                                                      Re: Parentheses cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-04 10:51 +0000
                                                        Re: Parentheses Bart <bc@freeuk.com> - 2026-06-04 12:47 +0100
                                                          Re: Parentheses Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-04 14:57 +0200
                                                          Re: Parentheses cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-04 14:31 +0000
                                                [OT] Fancy graphics (was Re: this girl calls c ugly) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-02 15:54 +0200
                                                  Re: [OT] Fancy graphics (was Re: this girl calls c ugly) Bart <bc@freeuk.com> - 2026-06-02 15:19 +0100
                                                  Re: [OT] Fancy graphics (was Re: this girl calls c ugly) cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-02 15:19 +0000
                                                    Re: [OT] Fancy graphics (was Re: this girl calls c ugly) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-02 17:39 +0200
                                                      Re: [OT] Fancy graphics (was Re: this girl calls c ugly) cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-02 16:36 +0000
                                                        Re: [OT] Fancy graphics (was Re: this girl calls c ugly) scott@slp53.sl.home (Scott Lurndal) - 2026-06-02 21:33 +0000
                                                          Re: [OT] Fancy graphics (was Re: this girl calls c ugly) "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-06-02 14:43 -0700
                                                    Re: [OT] Fancy graphics (was Re: this girl calls c ugly) ram@zedat.fu-berlin.de (Stefan Ram) - 2026-06-02 17:08 +0000
                                                      Re: [OT] Fancy graphics (was Re: this girl calls c ugly) cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-02 19:19 +0000
                                                      Re: [OT] Fancy graphics (was Re: this girl calls c ugly) Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-06-04 00:11 +0000
                                                    Re: [OT] Fancy graphics (was Re: this girl calls c ugly) Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-02 15:39 -0700
                                                      Re: [OT] Fancy graphics (was Re: this girl calls c ugly) cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-03 13:14 +0000
                                                Re: this girl calls c ugly scott@slp53.sl.home (Scott Lurndal) - 2026-06-02 15:10 +0000
                                                  Re: this girl calls c ugly cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-02 15:31 +0000
                                            Re: this girl calls c ugly James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-05-31 10:15 -0400
                                              Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-05-31 16:29 +0200
                                          Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-05-31 03:45 -0700
                                            Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-05-31 04:02 -0700
                                          Re: this girl calls c ugly Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-05-31 09:04 -0700
                                            Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-05-31 18:11 +0100
                                              Re: this girl calls c ugly cross@spitfire.i.gajendra.net (Dan Cross) - 2026-05-31 19:34 +0000
                                              Re: this girl calls c ugly Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-05-31 19:10 -0700
                                                Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-06-01 11:12 +0100
                                                  Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-06-01 12:36 +0200
                                                  Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-01 14:26 -0700
                                                  Re: this girl calls c ugly Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-06-04 02:34 -0700
                                                    Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-06-04 12:40 +0100
                                                      Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-06-04 14:35 +0200
                                                        Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-06-04 14:18 +0100
                                                          Re: this girl calls c ugly Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-04 15:47 +0200
                                                            Re: this girl calls c ugly Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-04 15:57 +0200
                                                          Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-06-04 16:27 +0200
                                                            Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-06-04 16:46 +0100
                                                              Re: this girl calls c ugly Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-04 20:15 +0200
                                                              Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-06-04 20:54 +0200
                                                                Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-06-04 20:29 +0100
                                                                  Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-04 14:06 -0700
                                                                    Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-06-04 22:47 +0100
                                                                      Famous (hopefully last) words [on this topic] Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-05 00:27 +0200
                                                                        Re: Famous (hopefully last) words [on this topic] Bad Post <invalid@invalid.invalid> - 2026-06-05 01:20 +0100
                                                                      Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-04 16:09 -0700
                                                                        Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-06-05 00:44 +0100
                                                                          Re: this girl calls c ugly "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-06-04 17:26 -0700
                                                                            Re: this girl calls c ugly antispam@fricas.org (Waldek Hebisch) - 2026-06-05 12:58 +0000
                                                                              Re: this girl calls c ugly "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-06-05 14:27 -0700
                                                                      Re: this girl calls c ugly cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-05 02:47 +0000
                                                                        Re: this girl calls c ugly Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-06-05 00:53 -0700
                                                                          Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-06-05 11:04 +0100
                                                                            Re: this girl calls c ugly Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-06-05 05:34 -0700
                                                                              Re: this girl calls c ugly cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-06 03:45 +0000
                                                                            Re: this girl calls c ugly cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-06 03:44 +0000
                                                                              Re: this girl calls c ugly Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-06 07:39 +0200
                                                                  Re: this girl calls c ugly "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-06-04 15:25 -0700
                                                                  Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-06-05 09:29 +0200
                                                                    Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-06-05 12:39 +0100
                                                                      Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-06-05 15:42 +0200
                                                                        Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-06-05 16:50 +0100
                                                                      Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-05 11:09 -0700
                                                                        Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-06-05 20:29 +0100
                                                            Re: this girl calls c ugly scott@slp53.sl.home (Scott Lurndal) - 2026-06-04 16:18 +0000
                                                              Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-06-04 17:23 +0100
                                                                Re: this girl calls c ugly scott@slp53.sl.home (Scott Lurndal) - 2026-06-04 16:47 +0000
                                                                  Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-06-04 19:57 +0100
                                                                    Re: this girl calls c ugly scott@slp53.sl.home (Scott Lurndal) - 2026-06-04 20:34 +0000
                                                                      Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-06-04 22:28 +0100
                                                                        Re: this girl calls c ugly scott@slp53.sl.home (Scott Lurndal) - 2026-06-04 21:58 +0000
                                                                        Re: this girl calls c ugly Richard Harnden <richard.nospam@gmail.invalid> - 2026-06-04 23:25 +0100
                                                                        Re: this girl calls c ugly cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-05 02:49 +0000
                                                              Re: this girl calls c ugly Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-04 19:47 +0200
                                                                Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-06-04 21:04 +0200
                                                                  Re: this girl calls c ugly Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2026-06-04 19:13 +0000
                                                                    Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-06-05 10:34 +0200
                                                                Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-04 12:11 -0700
                                                                Re: this girl calls c ugly James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-06-04 16:33 -0400
                                                                  Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-04 14:16 -0700
                                                                    Re: this girl calls c ugly cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-05 00:02 +0000
                                                                      Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-04 18:36 -0700
                                                                        Re: this girl calls c ugly cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-05 02:54 +0000
                                                                    Re: this girl calls c ugly Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-06-05 05:49 -0700
                                                                      Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-05 11:01 -0700
                                                                        Re: this girl calls c ugly Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-06-05 11:53 -0700
                                                              Re: this girl calls c ugly Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2026-06-04 18:45 +0000
                                                                Re: this girl calls c ugly cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-04 20:19 +0000
                                                                  Re: this girl calls c ugly scott@slp53.sl.home (Scott Lurndal) - 2026-06-04 20:31 +0000
                                                                    Re: this girl calls c ugly cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-04 20:41 +0000
                                                                      Re: this girl calls c ugly scott@slp53.sl.home (Scott Lurndal) - 2026-06-04 20:49 +0000
                                                                        Re: this girl calls c ugly cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-05 00:03 +0000
                                                                          Re: this girl calls c ugly scott@slp53.sl.home (Scott Lurndal) - 2026-06-05 00:18 +0000
                                                                            Re: this girl calls c ugly cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-05 03:02 +0000
                                                                              Re: this girl calls c ugly scott@slp53.sl.home (Scott Lurndal) - 2026-06-05 14:04 +0000
                                                                                Re: this girl calls c ugly cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-06 03:49 +0000
                                                                                  Re: this girl calls c ugly scott@slp53.sl.home (Scott Lurndal) - 2026-06-06 15:13 +0000
                                                                                  Re: this girl calls c ugly scott@slp53.sl.home (Scott Lurndal) - 2026-06-06 17:53 +0000
                                                          Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-04 11:59 -0700
                                                        Re: this girl calls c ugly Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-04 15:21 +0200
                                                      Re: this girl calls c ugly Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-06-04 06:38 -0700
                                              Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-06-01 09:52 +0200
                                                Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-01 02:42 -0700
                                                  Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-06-01 12:50 +0200
                                                Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-06-01 11:47 +0100
                                                  Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-06-01 12:55 +0200
                                                  Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-01 14:39 -0700
                                                    Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-01 15:11 -0700
                                                      Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-06-02 08:41 +0200
                                                        Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-02 02:07 -0700
                                                          Re: this girl calls c ugly Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-02 11:38 +0200
                                                            Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-02 05:01 -0700
                                                              It is not futile to change the subject line (Was: this girl calls c ugly) gazelle@shell.xmission.com (Kenny McCormack) - 2026-06-02 12:39 +0000
                                                                Re: It is not futile to change the subject line (Was: this girl calls c ugly) gazelle@shell.xmission.com (Kenny McCormack) - 2026-06-02 12:42 +0000
                                                          Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-06-02 11:46 +0200
                                                            Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-06-02 11:09 +0100
                                                              Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-02 05:25 -0700
                                                                Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-06-02 14:20 +0100
                                                                Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-02 15:12 -0700
                                                          Re: this girl calls c ugly Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-06-02 04:16 -0700
                                                    Re: this girl calls c ugly Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-06-01 15:23 -0700
                                                      Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-01 16:06 -0700
                                                    Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-06-01 23:24 +0100
                                                      Re: this girl calls c ugly Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-02 11:35 +0200
                                                    Operator precedence in other (non-C, but "C-like") languages (Was: something about a girl) gazelle@shell.xmission.com (Kenny McCormack) - 2026-06-02 12:36 +0000
                                                Re: this girl calls c ugly cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-01 11:04 +0000
                                                  Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-06-01 14:04 +0200
                                                    Re: this girl calls c ugly cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-01 18:48 +0000
                                                      Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-06-01 21:04 +0100
                                                        Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-06-02 09:17 +0200
                                                      Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-06-02 09:09 +0200
                                                        Re: this girl calls c ugly cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-02 12:07 +0000
                                                          Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-06-02 14:37 +0200
                                                          Microcontroller software stacks (was Re: this girl calls c ugly) scott@slp53.sl.home (Scott Lurndal) - 2026-06-02 15:06 +0000
                                                      Re: this girl calls c ugly Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-06-04 03:58 -0700
                                                Re: this girl calls c ugly dave_thompson_2@comcast.net - 2026-06-06 19:02 -0400
                                      Re: this girl calls c ugly cross@spitfire.i.gajendra.net (Dan Cross) - 2026-05-31 19:11 +0000
                                    Re: this girl calls c ugly Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-05-31 16:08 -0700
                                      Re: this girl calls c ugly Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-05-31 16:32 -0700
                                        Re: this girl calls c ugly Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-05-31 17:12 -0700
                          Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-05-30 14:07 +0200
                  Re: this girl calls c ugly Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-05-29 18:10 +0200
                    Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-05-29 19:18 +0100
                      Re: this girl calls c ugly Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-05-29 22:17 +0200
                        Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-05-29 21:47 +0100
                    Re: this girl calls c ugly James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-05-29 15:57 -0400
                      Re: this girl calls c ugly Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-05-29 22:34 +0200
                  Re: this girl calls c ugly Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-05-29 23:18 +0000
                    Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-05-30 01:26 +0100
                      Re: this girl calls c ugly Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-05-30 04:25 +0000
                        Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-05-30 12:01 +0100
                          Re: this girl calls c ugly Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-05-31 00:29 +0000
                            Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-05-31 10:59 +0100
                              Re: this girl calls c ugly Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-06-01 00:33 +0000
                                Re: this girl calls c ugly Bart <bc@freeuk.com> - 2026-06-01 02:26 +0100
                            Re: this girl calls c ugly David Brown <david.brown@hesbynett.no> - 2026-05-31 13:24 +0200
            Re: this girl calls c ugly Bonita Montero <Bonita.Montero@gmail.com> - 2026-05-29 08:09 +0200
              Re: this girl calls c ugly BGB <cr88192@gmail.com> - 2026-05-29 04:15 -0500
                Re: this girl calls c ugly Bonita Montero <Bonita.Montero@gmail.com> - 2026-05-29 14:58 +0200
                  Re: this girl calls c ugly BGB <cr88192@gmail.com> - 2026-05-30 01:04 -0500
              Re: this girl calls c ugly Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-05-29 23:20 +0000
                Re: this girl calls c ugly Bonita Montero <Bonita.Montero@gmail.com> - 2026-05-30 11:18 +0200

Page 6 of 15 — ← Prev page 1 … 4 5 [6] 7 8 … 15  Next page →


#399779 — Re: Constants and undefined behavior

FromTim Rentsch <tr.17687@z991.linuxsc.com>
Date2026-06-06 18:06 -0700
SubjectRe: Constants and undefined behavior
Message-ID<86ik7v9n1e.fsf@linuxsc.com>
In reply to#399710
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:

> cross@spitfire.i.gajendra.net (Dan Cross) writes:
>
>> In article <865x3yd21n.fsf@linuxsc.com>,
>> Tim Rentsch  <tr.17687@z991.linuxsc.com> wrote:
>>
>>> cross@spitfire.i.gajendra.net (Dan Cross) writes:
>>>
>>>> In article <86ik81cfk5.fsf_-_@linuxsc.com>,
>>>> Tim Rentsch  <tr.17687@z991.linuxsc.com> wrote:
>
> [...]
>
>>>>> There's an important distinction to make here.  Consider this
>>>>> program:
>>>>>
>>>>>    #include <limits.h>
>>>>>
>>>>>    int
>>>>>    foo(){
>>>>>        int zero = (INT_MAX+1)*0;
>>>>>        return  zero;
>>>>>    }
>>>>>
>>>>>    int
>>>>>    main(){
>>>>>        return  0;
>>>>>    }
>>>>>
>>>>> This program does not transgress the bounds of undefined behavior.
>>>
>>> To clarify, the comments in my posting were meant to be read as
>>> saying the given text is the entire program, and that it is strictly
>>> conforming with respect to conforming hosted implementations.
>>> (Incidentally, given the rules for freestanding implementations, I'm
>>> not sure that it is even possible for any program to be strictly
>>> conforming with respect to conforming freestanding implementations.
>>> In any case my statements were meant only in the context of hosted
>>> implementations.)

[...]

> foo() has undefined behavior if it's called, so replacing its
> body with trapping code is valid.

Right.

> But (I'm reasonably sure that)
> an implementation cannot reject a program just because it can't
> prove that it has no undefined behavior during execution.  [...]

Right.

>> In your example, `foo` clearly exhibits UB;  I think your
>> argument is whether that has a realized effect or not, since the
>> UB is not invoked.  I'm saying that in general a compiler cannot
>> possibly know that when it compiles `foo`, and is free to assume
>> the worst.
>
> foo() exhibits UB if and only if it's called during execution.

Right.

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


#399788 — Re: Constants and undefined behavior

FromTim Rentsch <tr.17687@z991.linuxsc.com>
Date2026-06-07 22:34 -0700
SubjectRe: Constants and undefined behavior
Message-ID<867bo9a937.fsf@linuxsc.com>
In reply to#399779
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:

> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
[...]

>> But (I'm reasonably sure that)
>> an implementation cannot reject a program just because it can't
>> prove that it has no undefined behavior during execution.  [...]
>
> Right.

Expanding on that, there is no requirement even to try to
prove such a conjecture.  An implementation could simply
give a warning like "there may be undiagnosed constraint
violations in this compilation", and accept the TU no
matter what (except of course for the dreaded #error
preprocessing directive, which if encountered in a live
portion of the translation must result in a rejection).

I presume none of what I'm saying here is news to the usual
suspects;  mostly I'm saying it just to remind myself.

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


#399805 — Re: Constants and undefined behavior

FromTim Rentsch <tr.17687@z991.linuxsc.com>
Date2026-06-08 23:05 -0700
SubjectRe: Constants and undefined behavior
Message-ID<86tsrc8d0b.fsf@linuxsc.com>
In reply to#399693
cross@spitfire.i.gajendra.net (Dan Cross) writes:

> In article <865x3yd21n.fsf@linuxsc.com>,
> Tim Rentsch  <tr.17687@z991.linuxsc.com> wrote:
>
>> cross@spitfire.i.gajendra.net (Dan Cross) writes:
>>
>>> In article <86ik81cfk5.fsf_-_@linuxsc.com>,
>>> Tim Rentsch  <tr.17687@z991.linuxsc.com> wrote:
>>>
>>>> Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
>>>>
>>>>> On 2026-06-01 00:54, Keith Thompson wrote:
>>>>>
>>>>>>> [...]
>>>>>>
>>>>>> Yes, a compiler can reduce (a + b) * 0 to just 0.  But it's not
>>>>>> required to do so, and (INT_MAX + 1) * 0 still has undefined
>>>>>> behavior.  Undefined behavior is determined by the rules of the
>>>>>> abstract machine *without* any adjustments permitted by the as-if
>>>>>> rule.
>>>>>
>>>>> This is something I really don't get in the actual C-logic...
>>>>>
>>>>> Using constants that can be determined at compile time is UB here,
>>>>> despite the '* 0' mathematically indicating an IMO clear semantics,
>>>>> but using variables is only UB possibly at runtime?  [...]
>>>>
>>>> There's an important distinction to make here.  Consider this
>>>> program:
>>>>
>>>>    #include <limits.h>
>>>>
>>>>    int
>>>>    foo(){
>>>>        int zero = (INT_MAX+1)*0;
>>>>        return  zero;
>>>>    }
>>>>
>>>>    int
>>>>    main(){
>>>>        return  0;
>>>>    }
>>>>
>>>> This program does not transgress the bounds of undefined behavior.
>>
>> To clarify, the comments in my posting were meant to be read as
>> saying the given text is the entire program, and that it is strictly
>> conforming with respect to conforming hosted implementations.
>> (Incidentally, given the rules for freestanding implementations, I'm
>> not sure that it is even possible for any program to be strictly
>> conforming with respect to conforming freestanding implementations.
>> In any case my statements were meant only in the context of hosted
>> implementations.)
>
> Ok.
>
>>> [snip]
>>> Perhaps you mean that this is irrelevant because `foo` is not
>>> invoked, but I see no reason why that need be the case in e.g.
>>> a freestanding environment.
>>
>> I explained the context of my previous statements above.  Sorry for
>> not saying that in the original message.
>>
>>> In a hosted environment, I don't
>>> think anything explicitly prevents `foo` from being called after
>>> `main` returns (though I can't imagine that would happen in real
>>> life;  it would be weird if it did).
>>
>> The semantics described in the ISO C standard don't admit that
>> possibility.

I have read through much of what has been said in the subthread
following this posting.  I expect I will not be responding to much
of it;  my overall sense is that the discussion is mostly confused.
I would like to say one thing here, and see if that helps things.

> Could you please point to where it says this, in the C standard?
>
> I cannot find anything that says that arbitrary code cannot run
> after `main()` returns, and I don't see how that could possibly
> be true.

The logic here is backwards.  The C standard is prescriptive:  it
says what _does_ happen, not what _doesn't_ happen.  If one wants
to establish that some "action" takes place, it is necessary to
find a passage, or passages, in the C standard that, if all are
taken together, shows that the "action" occurs, or at least that it
can occur.  The C standard doesn't need to say that, for example, a
function x() other than main(), whose name is never referenced,
will never be called.  If someone wants to establish that x() could
be called, there needs to be a chain of reasoning going through the
semantic descriptions given in the C standard, to show that a call
to x() could occur.  If there is no such chain of reasoning, naming
the pertinent passages in the C standard, to establish a possible
call, then there is no possible call.  In other words the burden of
proof for a claim that some action could occur rests on whoever is
making the claim;  there is no need to look for something in the C
standard that says something cannot occur.

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


#399618

FromKeith Thompson <Keith.S.Thompson+u@gmail.com>
Date2026-06-02 05:35 -0700
Message-ID<10vmimv$2tjoi$3@kst.eternal-september.org>
In reply to#399608
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
> On 2026-06-01 00:54, Keith Thompson wrote:
>>> [...]
>> Yes, a compiler can reduce (a + b) * 0 to just 0.  But it's not
>> required to do so, and (INT_MAX + 1) * 0 still has undefined
>> behavior.  Undefined behavior is determined by the rules of the
>> abstract machine *without* any adjustments permitted by the as-if
>> rule.
>
> This is something I really don't get in the actual C-logic...
>
> Using constants that can be determined at compile time is UB here,
> despite the '* 0' mathematically indicating an IMO clear semantics,
> but using variables is only UB possibly at runtime? And despite all
> that the latter might not even get triggered because it's probably
> optimized away? - I can't help, this sounds really crude.
>
> Is there any rationale from the _software designer_'s perspective?

In the abstract machine, every operator and subexpression is
evaluated (barring things like "||", "&&", and "?:").  (INT_MAX + 1)
has undefined behavior due to overflow, therefore any expression
that has (INT_MAX + 1) as a subexpression has undefined behavior.

Replacing (expr * 0) by 0 is an optimization, and optimizations
are *optional*.  A naive implementation could generate code that
peforms the addition and the muliplication by 0; if the addition
traps, it traps.

Note that in a context that requires a constant expression, overflow is
a constraint violation.  For example, a case label like:

    case (INT_MAX + 1) * 0:

must be diagnosed at compile time.

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */

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


#399625

FromTim Rentsch <tr.17687@z991.linuxsc.com>
Date2026-06-02 06:29 -0700
Message-ID<86ecipcbqa.fsf@linuxsc.com>
In reply to#399618
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:

> Note that in a context that requires a constant expression, overflow is
> a constraint violation.  For example, a case label like:
>
>     case (INT_MAX + 1) * 0:
>
> must be diagnosed at compile time.

gcc disagrees with you.

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


#399628

FromDavid Brown <david.brown@hesbynett.no>
Date2026-06-02 16:10 +0200
Message-ID<10vmo8n$2ruaa$3@dont-email.me>
In reply to#399625
On 02/06/2026 15:29, Tim Rentsch wrote:
> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
> 
>> Note that in a context that requires a constant expression, overflow is
>> a constraint violation.  For example, a case label like:
>>
>>      case (INT_MAX + 1) * 0:
>>
>> must be diagnosed at compile time.
> 
> gcc disagrees with you.

My testing shows all versions of gcc that I tested on godbolt gave a 
warning, even without any options.  I don't believe that INT_MAX can 
have any type suffixes that would avoid the overflow.

What version of gcc and/or flags let that case label pass without a 
diagnostic?

(I don't know if Keith is correct about it being a constraint violation 
- I have not looked at the details there.)


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


#399652

FromKeith Thompson <Keith.S.Thompson+u@gmail.com>
Date2026-06-02 15:29 -0700
Message-ID<10vnlgu$382un$2@kst.eternal-september.org>
In reply to#399625
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>> Note that in a context that requires a constant expression, overflow is
>> a constraint violation.  For example, a case label like:
>>
>>     case (INT_MAX + 1) * 0:
>>
>> must be diagnosed at compile time.
>
> gcc disagrees with you.

What makes you think so?

$ cat c.c
#include <limits.h>
int main(void) {
    switch (0) {
        case (INT_MAX + 1) * 0:
            break;
    }
}
$ gcc -std=c17 -pedantic-errors -c c.c
c.c: In function ‘main’:
c.c:4:23: warning: integer overflow in expression of type ‘int’ results in ‘-2147483648’ [-Woverflow]
    4 |         case (INT_MAX + 1) * 0:
      |                       ^
c.c:4:9: error: overflow in constant expression [-Woverflow]
    4 |         case (INT_MAX + 1) * 0:
      |         ^~~~
$ 

But taking a closer look at the standard, I'm not 100% sure that the
language requires a diagnostic, though I think that's the intent.
The relevant constraint is:

    Each constant expression shall evaluate to a constant that is
    in the range of representable values for its type.

If I squint really hard, I can argue that the entire expression
has to be a constant expression, but it doesn't say that its
subexpressions are constant expressions -- and *if* INT_MAX +
1 evaluates to INT_MIN in the current implementation, then
(INT_MAX + 1) * 0 evaluates to 0 and therefore satisfies the
constraint.

But INT_MAX + 1 could legally trap, for example, and I don't believe
it was intended that a given expression can be a constant expression
or not depending on the vagaries of the behavior of an instance
of UB.

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */

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


#399748

FromTim Rentsch <tr.17687@z991.linuxsc.com>
Date2026-06-05 06:41 -0700
Message-ID<86bjdpayv0.fsf@linuxsc.com>
In reply to#399652
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:

> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>
>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>
>>> Note that in a context that requires a constant expression, overflow is
>>> a constraint violation.  For example, a case label like:
>>>
>>>     case (INT_MAX + 1) * 0:
>>>
>>> must be diagnosed at compile time.
>>
>> gcc disagrees with you.
>
> What makes you think so?
>
> [...]

I'm skipping this and proceeding on to the original question.

> But taking a closer look at the standard, I'm not 100% sure that the
> language requires a diagnostic, though I think that's the intent.
> The relevant constraint is:
>
>     Each constant expression shall evaluate to a constant that is
>     in the range of representable values for its type.
>
> If I squint really hard, I can argue that the entire expression
> has to be a constant expression, but it doesn't say that its
> subexpressions are constant expressions -- and *if* INT_MAX +
> 1 evaluates to INT_MIN in the current implementation, then
> (INT_MAX + 1) * 0 evaluates to 0 and therefore satisfies the
> constraint.

My reasoning is as follows.

To determine if the constraint is satisfied, the compiler must
first evaluate the expression (INT_MAX + 1) * 0.

To evaluate the expression (INT_MAX + 1) * 0, the compiler must
first evaluate the sub-expression (INT_MAX + 1).

Because the expression (INT_MAX + 1) overflows, the behavior is
undefined, and the compiler is free to decide that the value of
the sub-expression (INT_MAX + 1) is, let's say, 12.

The compiler next evaluates the overall expression as 12*0, which
is 0 (an int).

This result of the overall expression satisfies the constraint,
and so the compiler is not obliged to generate a diagnostic.

Going back, when evaluating (INT_MAX + 1), the compiler could
have decided to choose the value 3.14159e47.  In that case the
value of the overall expression would be 0.0.  This value has
type double, which does not satisfy the constraint that the
result have integer type.  Thus if the compiler had made this
decision then a diagnostic would be required.

Overall conclusion:  whether a diagnostic is required depends on
what behavior is chosen for the construct (INT_MAX + 1).  The
implementation could choose a behavior where the constraint is
satisfied, or it could choose a behavior where the constraint is
not satisfied.

> But INT_MAX + 1 could legally trap, for example, and I don't
> believe it was intended that a given expression can be a constant
> expression or not depending on the vagaries of the behavior of an
> instance of UB.

I see no basis for this belief.  My conclusions are based on what
the C standard actually says, rather than guesses about some
unstated "intentions".  I think you would do well to reach your
conclusions based more on the actual text of the C standard, and
less on your interpretation of what the text was "intended" to
mean.

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


#399756

FromKeith Thompson <Keith.S.Thompson+u@gmail.com>
Date2026-06-05 11:24 -0700
Message-ID<10vv49k$1aoa2$4@kst.eternal-september.org>
In reply to#399748
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>>> Note that in a context that requires a constant expression, overflow is
>>>> a constraint violation.  For example, a case label like:
>>>>
>>>>     case (INT_MAX + 1) * 0:
>>>>
>>>> must be diagnosed at compile time.
>>>
>>> gcc disagrees with you.
>>
>> What makes you think so?
>>
>> [...]
>
> I'm skipping this and proceeding on to the original question.

Why?

You made a statement, "gcc disagrees with you".  I demonstrated,
in text that you snipped, that gcc does in fact agree with me.
You were wrong.  I don't know the basis of your error, so I asked.
Or maybe I'm missing something, and you had a valid point that I
didn't understand.

You're not required to answer my question, which I think was
an extremely reasonable one, but quoting it and then explicitly
refusing to answer it is pointlessly rude.

I'd like to know whether you still think you were right.  If so,
I'd like to see your explanation.  If not, an admission that you
made a mistake would be appreciated.  But I expect neither from you.

[SNIP]

> I see no basis for this belief.  My conclusions are based on what
> the C standard actually says, rather than guesses about some
> unstated "intentions".  I think you would do well to reach your
> conclusions based more on the actual text of the C standard, and
> less on your interpretation of what the text was "intended" to
> mean.

The actual text of the standard implies that 42 is not an expression.
I rely on the obvious intent to conclude that it is.

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */

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


#399791

FromTim Rentsch <tr.17687@z991.linuxsc.com>
Date2026-06-08 08:35 -0700
Message-ID<86y0gp82pd.fsf@linuxsc.com>
In reply to#399756
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:

> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>
>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>
>>> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>>>
>>>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>>>
>>>>> Note that in a context that requires a constant expression, overflow is
>>>>> a constraint violation.  For example, a case label like:
>>>>>
>>>>>     case (INT_MAX + 1) * 0:
>>>>>
>>>>> must be diagnosed at compile time.
>>>>
>>>> gcc disagrees with you.
>>>
>>> What makes you think so?
>>>
>>> [...]
>>
>> I'm skipping this and proceeding on to the original question.
>
> Why?

gcc is not authoritative.  I didn't want to get into an argument
about whether gcc is conforming, or which version of gcc was used,
or any similar distractions.  The C standard /is/ authoritative,
and I thought it would save time to cut to the chase.

> You made a statement, "gcc disagrees with you".  I demonstrated,
> in text that you snipped, that gcc does in fact agree with me.

No, you didn't.

> You were wrong.

No, I wasn't.  Your testing was faulty.

> I don't know the basis of your error, so I asked.
> Or maybe I'm missing something, and you had a valid point that I
> didn't understand.

I'm offended that you think I have an obligation to remedy your
habit of lazy thinking, especially when as here the answer was
staring you right in the face, and you simply ignored it.

> You're not required to answer my question, which I think was
> an extremely reasonable one, but quoting it and then explicitly
> refusing to answer it is pointlessly rude.

I wasn't refusing to answer.  What I was doing was trying to
answer the original question, and answer it in a way that wouldn't
get lost in pointless bickering.  Silly me.

> I'd like to know whether you still think you were right.  If so,
> I'd like to see your explanation.  If not, an admission that you
> made a mistake would be appreciated.  But I expect neither from you.

I'd like to know why you ignored my explanation, based directly on
text from the C standard, about why an implementation is allowed to
process the code in question, without giving a diagnostic, and
still be conforming.  An explanation that Dan Cross agreed with,
even if he may not like the consequences.

In investigating this question, I have run compilations using
multiple versions of gcc, on two different platforms.  I have looked
carefully through the gcc man page.  I have also run compilations
using multiple versions of clang, on two different platforms.  After
doing all that, I ran compilations using godbolt, so I could check
the latest, or maybe almost latest, versions of gcc and clang.  All
the different versions of gcc and clang that I have tried support my
hypothesis that gcc (and now also clang) interpret the C standard so
as to conclude that conforming to the C standard need not require a
diagnostic for situations like the code under discussion..

I'd like to ask you to do two things.  First, read through the
reasoning given in my previous post, try to assess whether that
reasoning is sound, and post the results of yours contemplations.
Second, look again at the question of whether gcc (and also clang,
if you're up to it) support the hypothesis that a conforming
implementation need not give a diagnostic for code like that under
discussion.  See if you can find a way of framing the question that
supports my statement, rather than simply looking for one that
supports your preconceived ideas.  Post the results of your
investigations, both what other experiments you tried, and what your
assessment is of the results you got.

Do these two things and I will endeavor to explain my views on the
questions you have raised here, if such explanations are still
needed after your further examinations and comments.

> [SNIP]
>
>> I see no basis for this belief.  My conclusions are based on what
>> the C standard actually says, rather than guesses about some
>> unstated "intentions".  I think you would do well to reach your
>> conclusions based more on the actual text of the C standard, and
>> less on your interpretation of what the text was "intended" to
>> mean.
>
> The actual text of the standard implies that 42 is not an expression.
> I rely on the obvious intent to conclude that it is.

Now it is you who is changing the subject.  Besides not being on
point to the question being considered, it's a silly argument, and I
would hope you are smart enough to realize that.  However, if you do
what I have asked in the previous paragraph, I can try to explain
why I think your views on this unrelated matter are wrongheaded.

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


#399795

Fromcross@spitfire.i.gajendra.net (Dan Cross)
Date2026-06-08 17:33 +0000
Message-ID<1106udm$jmf$1@reader1.panix.com>
In reply to#399791
In article <86y0gp82pd.fsf@linuxsc.com>,
Tim Rentsch  <tr.17687@z991.linuxsc.com> wrote:
>Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>
>> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>>
>>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>>
>>>> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>>>>
>>>>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>>>>
>>>>>> Note that in a context that requires a constant expression, overflow is
>>>>>> a constraint violation.  For example, a case label like:
>>>>>>
>>>>>>     case (INT_MAX + 1) * 0:
>>>>>>
>>>>>> must be diagnosed at compile time.
>>>>>
>>>>> gcc disagrees with you.
>>>>
>>>> What makes you think so?
>>>>
>>>> [...]
>>>
>>> I'm skipping this and proceeding on to the original question.
>>
>> Why?
>
>gcc is not authoritative.

You, Tim, wrote the words, "gcc disagrees with you."

If you didn't want to bring GCC into it, because it is not
authoritative (which is true), then why did you mention it in
the first place?

>I didn't want to get into an argument
>about whether gcc is conforming, or which version of gcc was used,
>or any similar distractions.

You opened that door and walked through it.

>The C standard /is/ authoritative,
>and I thought it would save time to cut to the chase.

Then you should have done that from the start, and not mentioned
GCC.

>> [snip]
>> I'd like to know whether you still think you were right.  If so,
>> I'd like to see your explanation.  If not, an admission that you
>> made a mistake would be appreciated.  But I expect neither from you.
>
>I'd like to know why you ignored my explanation, based directly on
>text from the C standard, about why an implementation is allowed to
>process the code in question, without giving a diagnostic, and
>still be conforming.  An explanation that Dan Cross agreed with,
>even if he may not like the consequences.

I am mystified as to why you are bringing my name into this, and
why you think "I may not like the consequences", or even what
that means.  In any event, you are evidently laboring under some
assumption about what I think about this matter that is probably
incorrect.

Because I am not you, I cannot know this for a fact, let alone
why it may be.  Regardless, I suggest you don't do that, or at a
minimum seek clarity from the referent of your assumptions,
before making claims about they may think.

>In investigating this question, I have run compilations using
>multiple versions of gcc, on two different platforms.  I have looked
>carefully through the gcc man page.  I have also run compilations
>using multiple versions of clang, on two different platforms.  After
>doing all that, I ran compilations using godbolt, so I could check
>the latest, or maybe almost latest, versions of gcc and clang.  All
>the different versions of gcc and clang that I have tried support my
>hypothesis that gcc (and now also clang) interpret the C standard so
>as to conclude that conforming to the C standard need not require a
>diagnostic for situations like the code under discussion..

It appears that you are appealing to a certain kind of semantic
precision, that is itself based on a number of assumptions that
are unstated, but that are implicit in your writing.  Further,
you give every indication of believing that a reader should
simply intuitively know.

In fact, both GCC and clang (the versions I tried on the
platforms I tried on) emit a diagnostic for the code under
consideration.  Your assertion appears to be that that is
unrelated to the constraint in section 6.6 para 4, which seems
accurate.

But you did not say that: instead, you just made a vague
statement that "gcc disagrees with you."  That's not useful, and
no one can reasonably know what you meant unless you elaborated
on it.

When it was pointed out to you that in fact GCC generates a
diagnostic, you had an opportunity to clarify that it was not in
response to the aforementioned constraint violation.  You chose
not to do so, and instead of arrogantly accuse others of
laziness and a lack of willingness to understand.

Insisting that your readers adhere to some arbitrary level of
semantic precision you seem to fancy yourself expressing is not
actually a sign of true expertise.  Real expertise is most
readily demonstrated through effective communication.

>I'd like to ask you to do two things.  First, read through the
>reasoning given in my previous post, try to assess whether that
>reasoning is sound, and post the results of yours contemplations.
>
>Second, look again at the question of whether gcc (and also clang,
>if you're up to it) support the hypothesis that a conforming
>implementation need not give a diagnostic for code like that under
>discussion.  See if you can find a way of framing the question that
>supports my statement, rather than simply looking for one that
>supports your preconceived ideas.  Post the results of your
>investigations, both what other experiments you tried, and what your
>assessment is of the results you got.
>
>Do these two things and I will endeavor to explain my views on the
>questions you have raised here, if such explanations are still
>needed after your further examinations and comments.

It is rather cavalier to make imperative statements to others
regarding how they must spend their time.

>> [SNIP]
>>
>>> I see no basis for this belief.  My conclusions are based on what
>>> the C standard actually says, rather than guesses about some
>>> unstated "intentions".  I think you would do well to reach your
>>> conclusions based more on the actual text of the C standard, and
>>> less on your interpretation of what the text was "intended" to
>>> mean.
>>
>> The actual text of the standard implies that 42 is not an expression.
>> I rely on the obvious intent to conclude that it is.
>
>Now it is you who is changing the subject.  Besides not being on
>point to the question being considered, it's a silly argument, and I
>would hope you are smart enough to realize that.  However, if you do
>what I have asked in the previous paragraph, I can try to explain
>why I think your views on this unrelated matter are wrongheaded.

Is it a silly argument?

Perhaps Keith has some reason for suggesting that such an
interpretation is be valid.  I'm not aware of what that might
be, but I suspect you are not, either.  But without even knowing
what the argument is, how would you know?

You are the one admonishing others to look at the letter of the
standard ("My conclusions are based on what the C standard
actually says..."), yet here you dismiss as "a silly argument",
a thing brought up by someone who has demonstrated that they
generally know what they're talking about, and you have done so
without even bothering to ask what they might be refering to.

In fact, I think this fits a pattern of behavior I observe from
you fairly consistently.  You decide on an interpretation,
declare it correct, and appear to scoff at anyone else who does
not immediately share that interpretation as being "lazy" or
worse.

Ironically, you yourself do not do well when you are shown to be
wrong about something; cf your bizarre statement about Rust not
being strongly typed.  This does not do well for your
credibility; everyone makes mistakes now and again, and you are
no different, but your seeming inability to admit to it when it
is obvious decreases faith in your interpretations when they are
not obvious.

You would do well to express more humility, and consider how
others might perceive you based on the way you talk to them.

	- Dan C.

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


#399798

FromKeith Thompson <Keith.S.Thompson+u@gmail.com>
Date2026-06-08 13:40 -0700
Message-ID<11079cs$3grso$1@kst.eternal-september.org>
In reply to#399791
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>>> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>>>>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>>>>> Note that in a context that requires a constant expression, overflow is
>>>>>> a constraint violation.  For example, a case label like:
>>>>>>
>>>>>>     case (INT_MAX + 1) * 0:
>>>>>>
>>>>>> must be diagnosed at compile time.
>>>>>
>>>>> gcc disagrees with you.
>>>>
>>>> What makes you think so?
>>>>
>>>> [...]
>>>
>>> I'm skipping this and proceeding on to the original question.

What question?  I made a statement.

>> Why?
>
> gcc is not authoritative.  I didn't want to get into an argument
> about whether gcc is conforming, or which version of gcc was used,
> or any similar distractions.  The C standard /is/ authoritative,
> and I thought it would save time to cut to the chase.

I never said gcc is authoritative.  *You* brought gcc into the
discussion.

It is a fact that gcc issues a diagnostic for that case label.
It is a fact that it's a non-fatal warning with "-pedantic" and a
fatal error with "-pedantic-errors", which implies, as I understand
it, that the authors of gcc believe that the diagnostic is required
by the standard.

>> You made a statement, "gcc disagrees with you".  I demonstrated,
>> in text that you snipped, that gcc does in fact agree with me.
>
> No, you didn't.

Yes, I did.

>> You were wrong.
>
> No, I wasn't.  Your testing was faulty.

Yes, you were.  My testing was not faulty.

What exactly did you mean by "gcc disagrees with you"?  I
think it's sufficiently obvious that gcc does not have opinions,
so you presumably were speaking figuratively in some sense.
Do you not see the same diagnostic I saw?

>> I don't know the basis of your error, so I asked.
>> Or maybe I'm missing something, and you had a valid point that I
>> didn't understand.
>
> I'm offended that you think I have an obligation to remedy your
> habit of lazy thinking, especially when as here the answer was
> staring you right in the face, and you simply ignored it.

OK.  I'm offended by your superior attitude.  I'm offended by your
refusal to consider that you might have made a mistake.  I'm offended
by your refusal to explain what you meant by an unclear statement
after I repeatedly ask you to do so.  I'm offended by your apparent
assumption that if the rest of us just *think really hard*, we'll
inevitably agree with you.

>> You're not required to answer my question, which I think was
>> an extremely reasonable one, but quoting it and then explicitly
>> refusing to answer it is pointlessly rude.
>
> I wasn't refusing to answer.  What I was doing was trying to
> answer the original question, and answer it in a way that wouldn't
> get lost in pointless bickering.  Silly me.

I'm assuming that by "the original question", you're referring to my
*statement* that a diagnostic is required for the above case label.
If you have some other "original question" in mind, please specify
it.  Please do not insult me by assuming that I'll know exactly
what you mean if I just reread what you wrote and think hard enough.

If you were trying to answer the "original question", you failed.
You expressed your supposed disagrement by asserting, without
further explanation, that gcc disagrees with me -- when, in fact,
it does not, and when gcc's behavior is not directly relevant to
the original statement anyway (since, as you correctly point out,
gcc is not authoritative).

>> I'd like to know whether you still think you were right.  If so,
>> I'd like to see your explanation.  If not, an admission that you
>> made a mistake would be appreciated.  But I expect neither from you.
>
> I'd like to know why you ignored my explanation, based directly on
> text from the C standard, about why an implementation is allowed to
> process the code in question, without giving a diagnostic, and
> still be conforming.  An explanation that Dan Cross agreed with,
> even if he may not like the consequences.

That explanation is not relevant to your claim that gcc disagrees
with me, which is what I asked you about.

> In investigating this question, I have run compilations using
> multiple versions of gcc, on two different platforms.  I have looked
> carefully through the gcc man page.  I have also run compilations
> using multiple versions of clang, on two different platforms.  After
> doing all that, I ran compilations using godbolt, so I could check
> the latest, or maybe almost latest, versions of gcc and clang.  All
> the different versions of gcc and clang that I have tried support my
> hypothesis that gcc (and now also clang) interpret the C standard so
> as to conclude that conforming to the C standard need not require a
> diagnostic for situations like the code under discussion..

You've told us what you concluded from your compilations using godbolt.
You haven't told us what those compilations actually told you.

On the off chance that you're willing to answer a straightforward
question:

Here's one result I got on my system:

$ gcc16 --version | head -n 1
gcc16 (GCC) 16.1.0
$ cat c.c
#include <limits.h>
int main(void) {
    switch(0) {
        case (INT_MAX + 1) * 0:
            break;
    }
}
$ gcc16 -std=c23 -pedantic-errors -c c.c
c.c: In function ‘main’:
c.c:4:23: warning: integer overflow in expression of type ‘int’ results in ‘-2147483648’ [-Woverflow]
    4 |         case (INT_MAX + 1) * 0:
      |                       ^
c.c:4:9: error: overflow in constant expression [-Woverflow]
    4 |         case (INT_MAX + 1) * 0:
      |         ^~~~
$

gcc emitted a fatal error message on that case label.  Have you
seen any version of gcc, either on your system or on godbolt,
*not* issue a fatal error message when invoked on that source with
"-std=cNN -pedantic-errors" (NN=23, or any valid value you like)?
If so, have you seen it not at least issue a warning?

If not, what is the basis for your claim that gcc disagrees with me?

It's conceivable that what you meant is that gcc happens to issue
a diagnostic, but is not required to.  If so, then (a) that's
sufficiently subtle that any reasonable person would have explained
that point, and (b) given that gcc produces a diagnostic, I see no
basis to assume that gcc "thinks" it's not required to do so.

> I'd like to ask you to do two things.  First, read through the
> reasoning given in my previous post, try to assess whether that
> reasoning is sound, and post the results of yours contemplations.
> Second, look again at the question of whether gcc (and also clang,
> if you're up to it) support the hypothesis that a conforming
> implementation need not give a diagnostic for code like that under
> discussion.  See if you can find a way of framing the question that
> supports my statement, rather than simply looking for one that
> supports your preconceived ideas.  Post the results of your
> investigations, both what other experiments you tried, and what your
> assessment is of the results you got.

You made a very simple claim, that gcc disagrees with me.  I'm asking
you about *that statement*.  Do you still assert that gcc disagrees
with me?  (That is not a question about the C standard.)

> Do these two things and I will endeavor to explain my views on the
> questions you have raised here, if such explanations are still
> needed after your further examinations and comments.
>
>> [SNIP]
>>
>>> I see no basis for this belief.  My conclusions are based on what
>>> the C standard actually says, rather than guesses about some
>>> unstated "intentions".  I think you would do well to reach your
>>> conclusions based more on the actual text of the C standard, and
>>> less on your interpretation of what the text was "intended" to
>>> mean.
>>
>> The actual text of the standard implies that 42 is not an expression.
>> I rely on the obvious intent to conclude that it is.
>
> Now it is you who is changing the subject.  Besides not being on
> point to the question being considered, it's a silly argument, and I
> would hope you are smart enough to realize that.  However, if you do
> what I have asked in the previous paragraph, I can try to explain
> why I think your views on this unrelated matter are wrongheaded.

Please be less condescending.

Leaving gcc aside, my original statement was that a case label like:

    case (INT_MAX + 1) * 0:

is a constraint violation (and therefore that it requires a diagnostic).
It's possible that I'm mistaken on that point.  The constraint I claim
it violates is that "Each constant expression shall evaluate to a
constant that is in the range of representable values for its type."

We could have discussed that much more briefly if you hadn't dragged
gcc into it.

I acknowledge that it can also be reasonably argued that the
expression as a whole *can*, for a particular implementation, yield
a result of 0, and therefore that a diagnostic is not required *for
such an implementation*.

The committee response to C90 DR #031 contradicts that argument:

    case (INT_MAX*4)/4: is a constraint violation.
    When subclause 6.4 says on page 55, lines 11-12:

        Each constant expression shall evaluate to a constant that is in the
        range of representable values for its type.

    the Committee's judgement of the intent is that the
    ``representable'' requirement applies to each subexpression of
    a constant expression, as shown in the third example. A constant
    expression is meant as defined by the syntax rules.

My judgement of the intent agrees with the Committee's, and, as
far as I can tell, with gcc's.

(I do think that the wording in the standard could and should be
improved.)

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */

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


#399799 — Meaning of "expression"

FromKeith Thompson <Keith.S.Thompson+u@gmail.com>
Date2026-06-08 14:05 -0700
SubjectMeaning of "expression"
Message-ID<1107aq2$3grso$2@kst.eternal-september.org>
In reply to#399756
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
[...]
> The actual text of the standard implies that 42 is not an expression.
> I rely on the obvious intent to conclude that it is.

I made the above statement to demonstrate that just following the exact
wording of the standard, without thinking about the (sometimes unclear)
intent behind it, can lead to absurd results.

I've discussed this particular glitch before, but it's been a while.

N3220 6.5.1 says:

    An *expression* is a sequence of operators and operands that
    specifies computation of a value, or that designates an object
    or a function, or that generates side effects, or that performs
    a combination thereof.

I believe the wording is unchanged from C90 up to the latest C202y
draft.  Since the word "expression" is in italics, this is the
standard's definition of the word.

This is a flawed definition.  The terms "operator" and "operand"
are defined in 6.4.6:

    *punctuator: one of
        [ ] ( )
    [snip]
    
    A punctuator is a symbol that has independent syntactic and semantic
    significance. Depending on context, it may specify an operation to
    be performed (which in turn may yield a value or a function
    designator, produce a side effect, or some combination thereof) in
    which case it is known as an *operator* (other forms of operator also
    exist in some contexts). An *operand* is an entity on which an
    operator acts.

Consider this expression statement:

    42;

Is `42` an expression?  Clearly it's intended to be, but there is no
operator, and therefore there is no operand, so it doesn't meet the
standard's definition of the word "expression".

For that matter, consider:

    (void)0;

It's "obvious" that `(void)0` is an expression.  It consists of one
operator `(void)` and one operand `0` (I'll ignore the fact that
the definition uses plurals for both), but it does not specify
computation of a value, or designate an object or a function,
or generates side effects, or perform a combination thereof.

The fact that the standard's definition of "expression" is flawed is
not much of a problem in practice.  Virtually everyone, implementers
and programmers, assumes the obvious intent.  Nobody believes that
`42` isn't an expression.  But it is my strongly held opinion that
the wording should be improved in a future edition of the standard.

I think it should say something to the effect that the meaning
of the term "expression" is defined by the grammar.  The current
wording that claims to be the definition of the term could, with
a few tweaks, still be turned into a valid normative statement
*about* expressions.

I have a similar issue with the standard's definition of "value":
"precise meaning of the contents of an object when interpreted as
having a specific type".  It's obvious that the result of evaluating
a non-void expression (such as the infamous `42`) is a "value",
but the definition implies that a "value" can only be the meaning
of the contents of an object.  Nobody is actually misled by the
current definition, but it should be improved.

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */

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


#399761

Fromcross@spitfire.i.gajendra.net (Dan Cross)
Date2026-06-06 03:22 +0000
Message-ID<11003or$t9b$1@reader1.panix.com>
In reply to#399748
In article <86bjdpayv0.fsf@linuxsc.com>,
Tim Rentsch  <tr.17687@z991.linuxsc.com> wrote:
>Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>> [snip]
>> But taking a closer look at the standard, I'm not 100% sure that the
>> language requires a diagnostic, though I think that's the intent.
>> The relevant constraint is:
>>
>>     Each constant expression shall evaluate to a constant that is
>>     in the range of representable values for its type.
>>
>> If I squint really hard, I can argue that the entire expression
>> has to be a constant expression, but it doesn't say that its
>> subexpressions are constant expressions -- and *if* INT_MAX +
>> 1 evaluates to INT_MIN in the current implementation, then
>> (INT_MAX + 1) * 0 evaluates to 0 and therefore satisfies the
>> constraint.
>
>My reasoning is as follows.
>
>To determine if the constraint is satisfied, the compiler must
>first evaluate the expression (INT_MAX + 1) * 0.
>
>To evaluate the expression (INT_MAX + 1) * 0, the compiler must
>first evaluate the sub-expression (INT_MAX + 1).
>
>Because the expression (INT_MAX + 1) overflows, the behavior is
>undefined, and the compiler is free to decide that the value of
>the sub-expression (INT_MAX + 1) is, let's say, 12.
>
>The compiler next evaluates the overall expression as 12*0, which
>is 0 (an int).
>
>This result of the overall expression satisfies the constraint,
>and so the compiler is not obliged to generate a diagnostic.

The text of the standard explicitly carves this out; or, rather,
it attempts to.  If the result of an expression is not
representable in the target type, _regardless of whether that's
due to UB or not_, a diagnostic is required.

But as it happens, I think I can see how your interpretation may
be valid: if, as a result of UB, the expression evaluates to "0"
(or 12 or something simiilar) that _is_ representable, then
there _is no constraint violation_ and so no diagnostic is
required.

I do not believe that that is the intent.  But it _is_
conformant with the text of the standard.

This is a problem with the C standard: it is insufficiently
precise, as the semantics of the language are not formally
defined.

>[snip]
>I see no basis for this belief.  My conclusions are based on what
>the C standard actually says, rather than guesses about some
>unstated "intentions".  I think you would do well to reach your
>conclusions based more on the actual text of the C standard, and
>less on your interpretation of what the text was "intended" to
>mean.

The same could be said to you, as well.  There exists a reading
of the standard by which your `foo`-containing program is not
strictly conforming .  But that way lies madness; C is not a
formally specified language.  Given that as an objective fact,
we must accept intent, consistency, and other "soft" aspects
when considering its definition.

That sort of sucks, but here we are.

	- Dan C.

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


#399767

FromKeith Thompson <Keith.S.Thompson+u@gmail.com>
Date2026-06-05 23:56 -0700
Message-ID<1100gbk$1lt8i$2@kst.eternal-september.org>
In reply to#399761
cross@spitfire.i.gajendra.net (Dan Cross) writes:
[...]
> The text of the standard explicitly carves this out; or, rather,
> it attempts to.  If the result of an expression is not
> representable in the target type, _regardless of whether that's
> due to UB or not_, a diagnostic is required.
[...]

How would an expression (appearing in a context that requires an
integer constant expression) not "evaluate to a constant that is in
the range of representable values for its type" other than by UB?
I can't think of an example, but I'd be interested in seeing one.

Note in particular that UINT_MAX+1U is well defined, not an overflow.

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */

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


#399783

Fromcross@spitfire.i.gajendra.net (Dan Cross)
Date2026-06-07 13:37 +0000
Message-ID<1103s6v$78r$1@reader1.panix.com>
In reply to#399767
In article <1100gbk$1lt8i$2@kst.eternal-september.org>,
Keith Thompson  <Keith.S.Thompson+u@gmail.com> wrote:
>cross@spitfire.i.gajendra.net (Dan Cross) writes:
>[...]
>> The text of the standard explicitly carves this out; or, rather,
>> it attempts to.  If the result of an expression is not
>> representable in the target type, _regardless of whether that's
>> due to UB or not_, a diagnostic is required.
>[...]
>
>How would an expression (appearing in a context that requires an
>integer constant expression) not "evaluate to a constant that is in
>the range of representable values for its type" other than by UB?

It wouldn't.  But because it's UB, it could evaluate to
anything, including something that didn't violate the
constraint.

>I can't think of an example, but I'd be interested in seeing one.

In terms of a practical, working compiler?  I doubt that one
exists.

>Note in particular that UINT_MAX+1U is well defined, not an overflow.

Yes.

	- Dan C.

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


#399784

FromKeith Thompson <Keith.S.Thompson+u@gmail.com>
Date2026-06-07 15:09 -0700
Message-ID<1104q77$2qkh5$1@kst.eternal-september.org>
In reply to#399783
cross@spitfire.i.gajendra.net (Dan Cross) writes:
> In article <1100gbk$1lt8i$2@kst.eternal-september.org>,
> Keith Thompson  <Keith.S.Thompson+u@gmail.com> wrote:
>>cross@spitfire.i.gajendra.net (Dan Cross) writes:
>>[...]
>>> The text of the standard explicitly carves this out; or, rather,
>>> it attempts to.  If the result of an expression is not
>>> representable in the target type, _regardless of whether that's
>>> due to UB or not_, a diagnostic is required.
>>[...]
>>
>>How would an expression (appearing in a context that requires an
>>integer constant expression) not "evaluate to a constant that is in
>>the range of representable values for its type" other than by UB?
>
> It wouldn't.  But because it's UB, it could evaluate to
> anything, including something that didn't violate the
> constraint.
>
>>I can't think of an example, but I'd be interested in seeing one.
>
> In terms of a practical, working compiler?  I doubt that one
> exists.

I actually meant in terms of the standard, not of any particular
compiler.

I can't think of an example, but maybe someone else can.

[...]

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */

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


#399787

Fromcross@spitfire.i.gajendra.net (Dan Cross)
Date2026-06-08 02:33 +0000
Message-ID<11059mm$mv5$2@reader1.panix.com>
In reply to#399784
In article <1104q77$2qkh5$1@kst.eternal-september.org>,
Keith Thompson  <Keith.S.Thompson+u@gmail.com> wrote:
>cross@spitfire.i.gajendra.net (Dan Cross) writes:
>> In article <1100gbk$1lt8i$2@kst.eternal-september.org>,
>> Keith Thompson  <Keith.S.Thompson+u@gmail.com> wrote:
>>>cross@spitfire.i.gajendra.net (Dan Cross) writes:
>>>[...]
>>>> The text of the standard explicitly carves this out; or, rather,
>>>> it attempts to.  If the result of an expression is not
>>>> representable in the target type, _regardless of whether that's
>>>> due to UB or not_, a diagnostic is required.
>>>[...]
>>>
>>>How would an expression (appearing in a context that requires an
>>>integer constant expression) not "evaluate to a constant that is in
>>>the range of representable values for its type" other than by UB?
>>
>> It wouldn't.  But because it's UB, it could evaluate to
>> anything, including something that didn't violate the
>> constraint.
>>
>>>I can't think of an example, but I'd be interested in seeing one.
>>
>> In terms of a practical, working compiler?  I doubt that one
>> exists.
>
>I actually meant in terms of the standard, not of any particular
>compiler.
>
>I can't think of an example, but maybe someone else can.
>
>[...]

Oh.  Well, I suppose something that relied on _IB_, like
conversion from a large unsigned integer type to a smaller
signed integer type that led to a trap, might fall into that
category.

	- Dan C.

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


#399789

FromTim Rentsch <tr.17687@z991.linuxsc.com>
Date2026-06-08 00:16 -0700
Message-ID<8633yxa4dg.fsf@linuxsc.com>
In reply to#399761
cross@spitfire.i.gajendra.net (Dan Cross) writes:

> In article <86bjdpayv0.fsf@linuxsc.com>,
> Tim Rentsch  <tr.17687@z991.linuxsc.com> wrote:
>
>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>
>>> [snip]
>>> But taking a closer look at the standard, I'm not 100% sure that the
>>> language requires a diagnostic, though I think that's the intent.
>>> The relevant constraint is:
>>>
>>>     Each constant expression shall evaluate to a constant that is
>>>     in the range of representable values for its type.
>>>
>>> If I squint really hard, I can argue that the entire expression
>>> has to be a constant expression, but it doesn't say that its
>>> subexpressions are constant expressions -- and *if* INT_MAX +
>>> 1 evaluates to INT_MIN in the current implementation, then
>>> (INT_MAX + 1) * 0 evaluates to 0 and therefore satisfies the
>>> constraint.
>>
>> My reasoning is as follows.
>>
>> To determine if the constraint is satisfied, the compiler must
>> first evaluate the expression (INT_MAX + 1) * 0.
>>
>> To evaluate the expression (INT_MAX + 1) * 0, the compiler must
>> first evaluate the sub-expression (INT_MAX + 1).
>>
>> Because the expression (INT_MAX + 1) overflows, the behavior is
>> undefined, and the compiler is free to decide that the value of
>> the sub-expression (INT_MAX + 1) is, let's say, 12.
>>
>> The compiler next evaluates the overall expression as 12*0, which
>> is 0 (an int).
>>
>> This result of the overall expression satisfies the constraint,
>> and so the compiler is not obliged to generate a diagnostic.
>
> The text of the standard explicitly carves this out;  or, rather,
> it attempts to.  If the result of an expression is not
> representable in the target type, _regardless of whether that's
> due to UB or not_, a diagnostic is required.

That's right.  However, the key point here is that it is the
implementation that determines (following the semantic rules given
in the C standard) what the value is, and so whether the value is
representable in the type of the expression.  Because of the
undefined behavior present in the expression in question, the
implementation is free to choose a value that /is/ representable,
and of the appropriate type, in which case no diagnostic is
required.

> But as it happens, I think I can see how your interpretation may
> be valid:  if, as a result of UB, the expression evaluates to "0"
> (or 12 or something simiilar) that _is_ representable, then
> there _is no constraint violation_ and so no diagnostic is
> required.

Right.  In fact the reasoning doesn't have to be so elaborate.
Just by looking at the types of the operands, a compiler can
determine the result is type int.  Then, just by noticing the
multiplication by 0, a compiler could decide that the result is
zero, because the compiler is free to assume that there was no
undefined behavior in the left-hand side expression.  Whether the
left-hand size expression has undefined behavior doesn't even have
to be checked to decide that (INT_MAX+1)*0 is 0, and so it can
satisfy the constraints of an integer constant expression.

> I do not believe that that is the intent.  But it _is_
> conformant with the text of the standard.

I think your intuition is leading you astray.  The people who
wrote the C standard have gone to great lengths to say (write)
what they mean and mean what they say (write).  I don't see any
evidence to suggest that this property doesn't apply in the
situation being discussed.

> This is a problem with the C standard:  it is insufficiently
> precise, as the semantics of the language are not formally
> defined.

On the contrary, the C standard is quite precise:  when a program
construct is encountered that the Standard identifies as having
undefined behavior, the Standard IMPOSES NO REQUIREMENTS on what
behavior may result.  That rule may not be what someone wants, but
there isn't any question about what is allowed, which is anything
at all.

>> [snip]
>> I see no basis for this belief.  My conclusions are based on what
>> the C standard actually says, rather than guesses about some
>> unstated "intentions".  I think you would do well to reach your
>> conclusions based more on the actual text of the C standard, and
>> less on your interpretation of what the text was "intended" to
>> mean.
>
> The same could be said to you, as well.  There exists a reading
> of the standard by which your `foo`-containing program is not
> strictly conforming .

The difference is my reading is based on what the C standard
actually says, and not on any guesses about "intent" or whether
the result "makes sense".  When reading the C standard it's
important to develop the habit of reading the text as neutrally as
one can, and not inject any subconscious ideas about what it ought
to be saying.

> But that way lies madness;  C is not a
> formally specified language.  Given that as an objective fact,
> we must accept intent, consistency, and other "soft" aspects
> when considering its definition.

The C standard is not written in formal mathematical language, but
it is written in formal English.  Certainly there are places in
the standard where what is said does a poor job of conveying what
is expected.  But the particular case of (INT_MAX+1)*0 is not one
of them.

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


#399790

Fromcross@spitfire.i.gajendra.net (Dan Cross)
Date2026-06-08 12:41 +0000
Message-ID<1106d97$huo$1@reader1.panix.com>
In reply to#399789
In article <8633yxa4dg.fsf@linuxsc.com>,
Tim Rentsch  <tr.17687@z991.linuxsc.com> wrote:
>cross@spitfire.i.gajendra.net (Dan Cross) writes:
>> [snip]
>> But as it happens, I think I can see how your interpretation may
>> be valid:  if, as a result of UB, the expression evaluates to "0"
>> (or 12 or something simiilar) that _is_ representable, then
>> there _is no constraint violation_ and so no diagnostic is
>> required.
>
>Right.  In fact the reasoning doesn't have to be so elaborate.
>Just by looking at the types of the operands, a compiler can
>determine the result is type int.  Then, just by noticing the
>multiplication by 0, a compiler could decide that the result is
>zero, because the compiler is free to assume that there was no
>undefined behavior in the left-hand side expression.  Whether the
>left-hand size expression has undefined behavior doesn't even have
>to be checked to decide that (INT_MAX+1)*0 is 0, and so it can
>satisfy the constraints of an integer constant expression.

I understand why you are saying this.  The relevant part of the
syntax is,

    multiplicative-expression:
        ...
        multiplicative-expression * cast-expression
        ...

Since UB imposes no requirements of any kind, the translator is
free to assume that the evaluation of the
`multiplicative-expression` component is well-defined, and
then multiplication by a `cast-expression` that evaluates to 0
is just 0.

But it is a good exercise to back that up by the letter of the
standard.  Recall that in this context, Keith was talking about
`case` labels.

The grammar given in the standard explicitly says that, in that
position, the expression must be a `constant-expression` (sec
6.8.2 ["Labeled statements"] para 1, "Syntax").  Constant
expressions must be evaluated in accordance with the semantic
rules of the abstract machine (sec 6.6 para 17), the rules for
which are spelled out in sec 5.1.2.4, specifically para 1, which
read, "The semantic descriptions in this document describe the
behavior of an abstract machine in which issues of optimization
are irrelevant" and para 4, which says that "all expressions
are evaluated as specified by the semantics."

Para (4) goes on to say, "an actual implementation is not
required to evaluate part of an expression if it can deduce that
its value is not used and that no needed side effects are
produced (including any caused by calling a function or through
volatile access to an object)."  So a translator is free to
replace, e.g., `(2 + 2)*0)` with 0.

But that doesn't mean that the presence of UB in this context is
insignificant; in fact, this entire interpretation rests on it.

>> I do not believe that that is the intent.  But it _is_
>> conformant with the text of the standard.
>
>I think your intuition is leading you astray.  The people who
>wrote the C standard have gone to great lengths to say (write)
>what they mean and mean what they say (write).  I don't see any
>evidence to suggest that this property doesn't apply in the
>situation being discussed.

This is not an arugment; it's an assertion, based on your own
intuition and your feelings about the text of the standard and
the level of precision you assume it takes.

In this specific context, Keith raised a valid point: how can
the constraint mentioned in sec 6.6 para 4 ever be violated
_without_ UB?  And since C imposes no requirement _at all_ with
respect to how a translator assesses the behavior of evaluating
a UB-bearing expression, then how can the diagnostic requirement
for a constraint violation ever be fulfilled here?  

My example is this:

    constexpr int A = ~0U;

The type of the rhs is `int` and the value is not representable
in a signed int.  As expected, this fails to compile, with a
diagnostic about the constraint violation:

```
term% cc -std=c23 -c constraint.c
constraint.c:1:19: error: constexpr initializer evaluates to 4294967295 which is not exactly representable in type 'const int'
    1 | constexpr int A = ~0U;
      |                   ^
1 error generated.
term% 
```

Adding an `(int)` cast takes advantage of IB, but allows the
program to compile:

```
term% cat constraint.c
constexpr int A = (int)~0U;
term% clang -Werror -pedantic -std=c23 -c constraint.c
term%
```

>> This is a problem with the C standard:  it is insufficiently
>> precise, as the semantics of the language are not formally
>> defined.
>
>On the contrary, the C standard is quite precise:

Consider that your definition of "precise" may not be shared.
This is an example of your own subjectivity.

>when a program
>construct is encountered that the Standard identifies as having
>undefined behavior, the Standard IMPOSES NO REQUIREMENTS on what
>behavior may result.  That rule may not be what someone wants, but
>there isn't any question about what is allowed, which is anything
>at all.

My statement, that you quoted and responded to, was not limited
to undefined behavior.  Rather, it was a general statement about
the imprecision of the C standard.

For whatever reason you have chosen to take that general
statement, and respond to it by posting about one thing that is
clearly defined in the standard, and that further, I believe
every participant in this discussion agrees on.  But clarity and
precision on a single point does not mean that the entire
standard, taken as a whole, is similarly precise and clear.

In fact, what I have been arguing all along is exactly what you
wrote above: the standard imposes _no requirements_ on the
resultant behavior of a program when a translator encounters
a program construct (for example, something like `INT_MAX + 1`,
whether immediately multiplied by zero or not) in the course of
translating that program.  The C standard does _not_ explicitly
say otherwise.

Unfortunately, the C standard is simply not a precise, formal
document.  This is well-known, and it's hardly C's fault: indeed
most of the applications of formalized descriptions of PL
semantics to practical programming languages postdates C's
invention; Dana Scott didn't introduce the term, "operational
semantics" until 1970, and it didn't start to make a serious
impact on languages until later.

That you would limit that statement to UB only betrays a lack of
understanding of what you responded to.  Whether that is my
fault or yours, I don't know.

[Note: I feel obliged to say that this is not the fault of the C
committee, Dennis Ritchie, Ken Thompson, Brian Kernighan, PJ
Plauger, Jean-Heyd Meneide, or anyone else; rather, it is an
unfortunate consequence of history, and one that cannot
reasonably be corrected.]

>>> [snip]
>>> I see no basis for this belief.  My conclusions are based on what
>>> the C standard actually says, rather than guesses about some
>>> unstated "intentions".  I think you would do well to reach your
>>> conclusions based more on the actual text of the C standard, and
>>> less on your interpretation of what the text was "intended" to
>>> mean.
>>
>> The same could be said to you, as well.  There exists a reading
>> of the standard by which your `foo`-containing program is not
>> strictly conforming .
>
>The difference is my reading is based on what the C standard
>actually says, and not on any guesses about "intent" or whether
>the result "makes sense". When reading the C standard it's
>important to develop the habit of reading the text as neutrally as
>one can, and not inject any subconscious ideas about what it ought
>to be saying.

Your reading of the standard is subjective and, as far as I can
tell, based on your own intuitions and presumptions of intent.
Indeed we see direct evidence of this in the message I quoted
above, where you ascribe a certain type of formality to that
document, that is not warranted.  Notice that your response to
my post about _an_ intepretation of that document is not to
point out how the text invalidates that reading, but rather, an
admonission on how to read the standard.

You would do well to take a moment and examine your own
preconceptions in how you read that document and approach the C
langauge.

>> But that way lies madness;  C is not a
>> formally specified language.  Given that as an objective fact,
>> we must accept intent, consistency, and other "soft" aspects
>> when considering its definition.
>
>The C standard is not written in formal mathematical language, but
>it is written in formal English.

Correct.

The C standard is written in the formal _register_; that is a
matter of voice, but is dramatically different than a formal
document with rigorously defined semantics.  It is full of terms
of art, and things that are imprecisely and informally specified
in prose.  The C standard strives, but sadlyfalls short in many
places.

Plenty of documents are written in a formal register and are
still ambiguous and imprecise.  That is one of the problems with
trying to define something like a programming language precisely
in prose.

Gogol wrote a rather famous story about a non-existent officer
who was accidentally manifested by a missing comma.  He didn't
exist, yet rose to become one of the Czar's favorites, as he
never made a mistake (since he did not exist).

Perhaps you will meditate on the implied analogy.

>Certainly there are places in
>the standard where what is said does a poor job of conveying what
>is expected.  But the particular case of (INT_MAX+1)*0 is not one
>of them.

This is a strawman.  You are correct that the standard is clear
as to the meaning, or more precisely lack thereof, of
`(INT_MAX + 1)*0`, when considered as an isolated expression.
What is much less clear are the implications of that when
translated.

	- Dan C.

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


Page 6 of 15 — ← Prev page 1 … 4 5 [6] 7 8 … 15  Next page →

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


csiph-web