Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #127729
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Future of C |
| Date | 2018-03-12 18:29 -0700 |
| Organization | None to speak of |
| Message-ID | <lna7vcbw69.fsf@kst-u.example.com> (permalink) |
| References | (11 earlier) <3r7jne-t3h.ln1@gangtai.grep.be> <8e201938-ada4-42d9-8ae6-13b1047306e2@googlegroups.com> <lnina0c1xg.fsf@kst-u.example.com> <JrEpC.185321$mN7.7780@fx16.am4> <69a08d82-b76a-4334-be63-20dc22f869bf@googlegroups.com> |
supercat@casperkitty.com writes:
[...]
> Is there any way in which the following program would not be Strictly
> Conforming:
>
> void test(size_t n)
> {
> int arr[n];
> arr[0] = 4;
> arr[n-1] = 6;
> }
> int main(void)
> {
> test(-2);
> }
>
> Conversion of the value -2 to a size_t has defined behavior, as would the
> declaration of the array. On the other hand, one of the writes to arr[]
> might very well clobber the stack even on a platform where guard pages
> would normally ensure a shutdown in case of stack overflow.
I suppose it's strictly conforming, but it's very likely to exceed a
capacity limit at run time.
void test(void) {
#define N ((size_t)-2)
int arr[N];
arr[0] = 4;
arr[N-1] = 6;
}
int main(void) {
test();
}
I fail to see what fundamentally new problems were introduced by VLAs
(when they were added to the language 19 years ago) that don't already
exist for fixed-length arrays.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar
Future of C Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-03-08 06:28 -0800
Re: Future of C "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2018-03-08 22:48 +0800
Re: Future of C Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2018-03-08 09:53 -0500
Re: Future of C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-03-08 15:02 +0000
Re: Future of C Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-03-08 07:32 -0800
Re: Future of C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-03-08 16:41 +0000
Re: Future of C Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-03-08 17:02 +0000
Re: Future of C Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-15 01:54 -0700
Re: Future of C Real Troll <real.troll@trolls.com> - 2018-03-08 11:55 -0400
Re: Future of C "Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid> - 2018-03-08 12:15 -0800
Re: Future of C jacobnavia <jacob@jacob.remcomp.fr> - 2018-03-12 11:34 +0100
Re: Future of C "Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid> - 2018-03-12 13:17 -0700
Re: Future of C GOTHIER Nathan <nathan.gothier@gmail.com> - 2018-03-10 18:00 +0100
Re: Future of C Real Troll <Real.Troll@Trolls.com> - 2018-03-10 17:25 -0400
Re: Future of C GOTHIER Nathan <nathan.gothier@gmail.com> - 2018-03-11 00:03 +0100
Re: Future of C David Kleinecke <dkleinecke@gmail.com> - 2018-03-10 16:52 -0800
Re: Future of C Robert Wessel <robertwessel2@yahoo.com> - 2018-03-10 23:41 -0600
Re: Future of C GOTHIER Nathan <nathan.gothier@gmail.com> - 2018-03-11 16:15 +0100
Re: Future of C David Kleinecke <dkleinecke@gmail.com> - 2018-03-11 14:31 -0700
Re: Future of C Spiros Bousbouras <spibou@gmail.com> - 2018-03-11 21:50 +0000
Re: Future of C supercat@casperkitty.com - 2018-03-11 15:02 -0700
Re: Future of C David Kleinecke <dkleinecke@gmail.com> - 2018-03-11 17:48 -0700
Re: Future of C Wouter Verhelst <w@uter.be> - 2018-03-12 22:25 +0100
Re: Future of C supercat@casperkitty.com - 2018-03-12 16:18 -0700
Re: Future of C Keith Thompson <kst-u@mib.org> - 2018-03-12 16:24 -0700
Re: Future of C bartc <bc@freeuk.com> - 2018-03-12 23:55 +0000
Re: Future of C supercat@casperkitty.com - 2018-03-12 17:14 -0700
Re: Future of C Keith Thompson <kst-u@mib.org> - 2018-03-12 18:29 -0700
Re: Future of C supercat@casperkitty.com - 2018-03-13 07:58 -0700
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-13 17:05 +0100
Re: Future of C supercat@casperkitty.com - 2018-03-13 09:38 -0700
Re: Future of C Melzzzzz <Melzzzzz@zzzzz.com> - 2018-03-13 21:51 +0000
Re: Future of C supercat@casperkitty.com - 2018-03-13 15:06 -0700
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-14 12:22 +0100
Re: Future of C Keith Thompson <kst-u@mib.org> - 2018-03-12 18:24 -0700
Re: Future of C bartc <bc@freeuk.com> - 2018-03-13 01:40 +0000
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-13 17:11 +0100
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-13 17:06 +0100
Re: Future of C Keith Thompson <kst-u@mib.org> - 2018-03-13 09:38 -0700
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-13 16:58 +0100
Re: Future of C supercat@casperkitty.com - 2018-03-12 17:01 -0700
Re: Future of C Ian Collins <ian-news@hotmail.com> - 2018-03-13 12:25 +1300
Re: Future of C Wouter Verhelst <w@uter.be> - 2018-03-13 10:19 +0100
Re: Future of C jameskuyper@verizon.net - 2018-03-13 07:45 -0700
Re: Future of C bartc <bc@freeuk.com> - 2018-03-13 16:15 +0000
Re: Future of C jameskuyper@verizon.net - 2018-03-13 10:20 -0700
Re: Future of C bartc <bc@freeuk.com> - 2018-03-13 17:45 +0000
Re: Future of C Keith Thompson <kst-u@mib.org> - 2018-03-13 11:51 -0700
Re: Future of C Wouter Verhelst <w@uter.be> - 2018-03-13 21:12 +0100
Re: Future of C Tim Rentsch <txr@alumni.caltech.edu> - 2018-03-17 10:11 -0700
Re: Future of C Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-18 05:21 -0700
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-13 17:16 +0100
Re: Future of C bartc <bc@freeuk.com> - 2018-03-13 18:05 +0000
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-13 21:28 +0100
Re: Future of C Keith Thompson <kst-u@mib.org> - 2018-03-13 13:39 -0700
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-13 21:57 +0100
Re: Future of C Keith Thompson <kst-u@mib.org> - 2018-03-13 14:26 -0700
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-14 12:23 +0100
Re: Future of C bartc <bc@freeuk.com> - 2018-03-13 21:22 +0000
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-14 13:02 +0100
Re: Future of C supercat@casperkitty.com - 2018-03-14 08:48 -0700
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-14 17:02 +0100
Re: Future of C bartc <bc@freeuk.com> - 2018-03-14 17:09 +0000
Re: Future of C Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-03-14 10:18 -0700
Re: Future of C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-03-14 20:04 +0000
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-14 21:46 +0100
Re: Future of C Keith Thompson <kst-u@mib.org> - 2018-03-14 14:03 -0700
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-15 09:22 +0100
Re: Future of C supercat@casperkitty.com - 2018-03-14 14:55 -0700
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-15 09:36 +0100
Re: Future of C supercat@casperkitty.com - 2018-03-15 07:55 -0700
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-16 00:19 +0100
Re: Future of C scott@slp53.sl.home (Scott Lurndal) - 2018-03-15 13:53 +0000
Re: Future of C supercat@casperkitty.com - 2018-03-14 11:37 -0700
Re: Future of C Keith Thompson <kst-u@mib.org> - 2018-03-14 12:12 -0700
Re: Future of C supercat@casperkitty.com - 2018-03-14 13:04 -0700
Re: Future of C Keith Thompson <kst-u@mib.org> - 2018-03-14 13:37 -0700
Re: Future of C supercat@casperkitty.com - 2018-03-14 14:16 -0700
Re: Future of C Keith Thompson <kst-u@mib.org> - 2018-03-14 15:27 -0700
Re: Future of C supercat@casperkitty.com - 2018-03-14 15:50 -0700
Re: Future of C Keith Thompson <kst-u@mib.org> - 2018-03-14 17:09 -0700
Re: Future of C supercat@casperkitty.com - 2018-03-14 20:18 -0700
Re: Future of C Keith Thompson <kst-u@mib.org> - 2018-03-15 10:25 -0700
Re: Future of C supercat@casperkitty.com - 2018-03-15 11:27 -0700
Re: Future of C scott@slp53.sl.home (Scott Lurndal) - 2018-03-15 19:42 +0000
Re: Future of C Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-15 22:03 -0700
Re: Future of C Keith Thompson <kst-u@mib.org> - 2018-03-15 12:54 -0700
Re: Future of C supercat@casperkitty.com - 2018-03-15 14:31 -0700
Re: Future of C Keith Thompson <kst-u@mib.org> - 2018-03-15 15:27 -0700
Re: Future of C supercat@casperkitty.com - 2018-03-15 15:47 -0700
Re: Future of C Keith Thompson <kst-u@mib.org> - 2018-03-15 16:05 -0700
Re: Future of C supercat@casperkitty.com - 2018-03-16 08:19 -0700
Re: Future of C Keith Thompson <kst-u@mib.org> - 2018-03-16 10:23 -0700
Re: Future of C supercat@casperkitty.com - 2018-03-16 17:21 -0700
Re: Future of C Keith Thompson <kst-u@mib.org> - 2018-03-16 18:37 -0700
Re: Future of C Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-16 21:25 -0700
Re: Future of C Wouter Verhelst <w@uter.be> - 2018-03-20 11:46 +0100
Re: Future of C Tim Rentsch <txr@alumni.caltech.edu> - 2018-03-17 10:50 -0700
Re: Future of C supercat@casperkitty.com - 2018-03-19 14:00 -0700
Re: Future of C Keith Thompson <kst-u@mib.org> - 2018-03-19 14:48 -0700
Re: Future of C supercat@casperkitty.com - 2018-03-19 15:21 -0700
Re: Future of C "Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid> - 2018-03-19 21:47 -0700
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-15 11:12 +0100
Re: Future of C Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-15 03:28 -0700
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-15 10:57 +0100
Re: Future of C William Ahern <william@25thandClement.com> - 2018-03-15 04:06 -0700
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-15 13:35 +0100
Re: Future of C Thiago Adams <thiago.adams@gmail.com> - 2018-03-15 05:47 -0700
Re: Future of C supercat@casperkitty.com - 2018-03-15 08:25 -0700
Re: Future of C scott@slp53.sl.home (Scott Lurndal) - 2018-03-15 16:14 +0000
Re: Future of C supercat@casperkitty.com - 2018-03-15 09:56 -0700
Re: Future of C Keith Thompson <kst-u@mib.org> - 2018-03-15 10:45 -0700
Re: Future of C scott@slp53.sl.home (Scott Lurndal) - 2018-03-15 18:15 +0000
Re: Future of C Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-15 11:22 -0700
Re: Future of C Keith Thompson <kst-u@mib.org> - 2018-03-15 12:38 -0700
Re: Future of C scott@slp53.sl.home (Scott Lurndal) - 2018-03-15 20:46 +0000
Re: Future of C supercat@casperkitty.com - 2018-03-15 15:14 -0700
Re: Future of C William Ahern <william@25thandClement.com> - 2018-03-15 22:56 -0700
Re: Future of C Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-16 00:39 -0700
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-19 11:35 +0100
Re: Future of C Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-19 03:46 -0700
Re: Future of C Keith Thompson <kst-u@mib.org> - 2018-03-15 10:35 -0700
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-16 00:36 +0100
Re: Future of C Keith Thompson <kst-u@mib.org> - 2018-03-15 10:40 -0700
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-16 00:26 +0100
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-15 10:36 +0100
Re: Future of C bartc <bc@freeuk.com> - 2018-03-15 14:43 +0000
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-15 16:03 +0100
Re: Future of C supercat@casperkitty.com - 2018-03-15 09:46 -0700
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-15 09:45 +0100
Re: Future of C bartc <bc@freeuk.com> - 2018-03-14 17:35 +0000
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-15 11:25 +0100
Re: Future of C bartc <bc@freeuk.com> - 2018-03-15 14:57 +0000
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-16 00:45 +0100
Re: Future of C bartc <bc@freeuk.com> - 2018-03-16 00:34 +0000
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-16 09:29 +0100
Re: Future of C Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-16 01:42 -0700
Re: Future of C bartc <bc@freeuk.com> - 2018-03-16 11:40 +0000
Re: Future of C Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-16 05:03 -0700
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-19 13:49 +0100
Re: Future of C Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-19 06:55 -0700
Re: Future of C bartc <bc@freeuk.com> - 2018-03-19 14:37 +0000
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-19 22:23 +0100
Re: Future of C supercat@casperkitty.com - 2018-03-19 13:28 -0700
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-19 23:39 +0100
Re: Future of C bartc <bc@freeuk.com> - 2018-03-19 23:47 +0000
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-20 00:59 +0100
Re: Future of C bartc <bc@freeuk.com> - 2018-03-20 00:20 +0000
Re: Future of C Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-03-20 12:42 +0000
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-20 14:09 +0100
Re: Future of C bartc <bc@freeuk.com> - 2018-03-16 01:36 +0000
Re: Future of C supercat@casperkitty.com - 2018-03-13 14:24 -0700
Re: Future of C bartc <bc@freeuk.com> - 2018-03-13 20:40 +0000
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-13 22:12 +0100
Re: Future of C Keith Thompson <kst-u@mib.org> - 2018-03-13 14:36 -0700
Re: Future of C bartc <bc@freeuk.com> - 2018-03-13 22:25 +0000
Re: Future of C Keith Thompson <kst-u@mib.org> - 2018-03-13 15:54 -0700
Re: Future of C bartc <bc@freeuk.com> - 2018-03-14 01:01 +0000
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-14 13:30 +0100
Re: Future of C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-03-14 01:02 +0000
Re: Future of C Keith Thompson <kst-u@mib.org> - 2018-03-14 10:04 -0700
Re: Future of C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-03-14 18:32 +0000
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-14 13:22 +0100
Re: Future of C Keith Thompson <kst-u@mib.org> - 2018-03-14 10:45 -0700
Re: Future of C Wouter Verhelst <w@uter.be> - 2018-03-13 21:19 +0100
Re: Future of C GOTHIER Nathan <nathan.gothier@gmail.com> - 2018-03-13 00:25 +0100
Re: Future of C Wouter Verhelst <w@uter.be> - 2018-03-13 10:08 +0100
Re: Future of C GOTHIER Nathan <nathan.gothier@gmail.com> - 2018-03-13 13:17 +0100
Re: Future of C Melzzzzz <Melzzzzz@zzzzz.com> - 2018-03-13 15:55 +0000
Re: Future of C Wouter Verhelst <w@uter.be> - 2018-03-13 21:20 +0100
Re: Future of C supercat@casperkitty.com - 2018-03-11 14:55 -0700
Re: Future of C Robert Wessel <robertwessel2@yahoo.com> - 2018-03-10 23:44 -0600
Re: Future of C Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-03-11 06:17 +0000
Re: Future of C jacobnavia <jacob@jacob.remcomp.fr> - 2018-03-12 11:55 +0100
Re: Future of C john.ladasky@gmail.com - 2018-03-11 03:34 -0700
Re: Future of C Wouter Verhelst <w@uter.be> - 2018-03-12 22:47 +0100
Re: Future of C David Brown <david.brown@hesbynett.no> - 2018-03-13 17:25 +0100
Re: Future of C Thiago Adams <thiago.adams@gmail.com> - 2018-03-13 09:40 -0700
Re: Future of C jacobnavia <jacob@jacob.remcomp.fr> - 2018-03-12 11:45 +0100
Re: Future of C scott@slp53.sl.home (Scott Lurndal) - 2018-03-12 16:01 +0000
Re: Future of C jameskuyper@verizon.net - 2018-03-12 09:25 -0700
Re: Future of C scott@slp53.sl.home (Scott Lurndal) - 2018-03-12 17:31 +0000
Re: Future of C jameskuyper@verizon.net - 2018-03-12 10:59 -0700
Re: Future of C jacobnavia <jacob@jacob.remcomp.fr> - 2018-03-12 11:44 +0100
Re: Future of C jacobnavia <jacob@jacob.remcomp.fr> - 2018-03-12 11:32 +0100
Re: Future of C asetofsymbols@gmail.com - 2018-03-12 08:18 -0700
Re: Future of C Thiago Adams <thiago.adams@gmail.com> - 2018-03-08 09:31 -0800
Re: Future of C Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2018-03-08 13:46 -0500
Re: Future of C Thiago Adams <thiago.adams@gmail.com> - 2018-03-08 12:26 -0800
Re: Future of C Thiago Adams <thiago.adams@gmail.com> - 2018-03-08 12:36 -0800
Re: Future of C Thiago Adams <thiago.adams@gmail.com> - 2018-03-08 12:55 -0800
Re: Future of C supercat@casperkitty.com - 2018-03-08 11:25 -0800
Re: Future of C Thiago Adams <thiago.adams@gmail.com> - 2018-03-08 12:30 -0800
Re: Future of C supercat@casperkitty.com - 2018-03-08 13:20 -0800
Re: Future of C Thiago Adams <thiago.adams@gmail.com> - 2018-03-09 04:17 -0800
Re: Future of C "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2018-03-11 22:58 +0800
Re: Future of C John Bode <jfbode1029@gmail.com> - 2018-03-08 14:36 -0800
Re: Future of C Thiago Adams <thiago.adams@gmail.com> - 2018-03-08 17:41 -0800
Re: Future of C jacobnavia <jacob@jacob.remcomp.fr> - 2018-03-09 03:15 +0100
Re: Future of C Reinhardt Behm <rbehm@hushmail.com> - 2018-03-09 12:58 +0800
Re: Future of C Les Cargill <lcargill99@comcast.com> - 2018-03-08 18:56 -0600
Re: Future of C GOTHIER Nathan <nathan.gothier@gmail.com> - 2018-03-10 18:20 +0100
Re: Future of C "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2018-03-11 22:59 +0800
[OT] C vs World Trade Center 9/11 "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2018-03-11 23:11 +0800
Re: Future of C scott@slp53.sl.home (Scott Lurndal) - 2018-03-12 17:34 +0000
Re: Future of C GOTHIER Nathan <nathan.gothier@gmail.com> - 2018-03-12 19:33 +0100
Re: Future of C Davs <johndemeert0@gmail.com> - 2018-03-11 17:48 -0700
Re: Future of C Manfred <noname@invalid.add> - 2018-03-13 20:54 +0100
Re: Future of C cprime.twitter@gmail.com - 2018-03-13 13:50 -0700
Re: Future of C "Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid> - 2018-03-15 22:05 -0700
Re: Future of C Manfred <noname@invalid.add> - 2018-03-16 19:07 +0100
csiph-web