c++ - DMC++ mishandles perverse, but legal, revered subscripting syntax for arrays
- Matthew (15/15) Feb 19 2004 All compiles except where marked. All should compile
- Ilya Minkov (4/5) Feb 20 2004 i think it may better stay so. It's definately not very annoying since
- Matthew (8/12) Feb 20 2004 Nonsense. It's non-standard behaviour, and in such a simple thing that a...
- Ilya Minkov (6/20) Feb 20 2004 I really don't need to count the reasons, i know i want to get it as
- Matthew (8/27) Feb 20 2004 any
- Ilya Minkov (3/9) Feb 21 2004 I've been spreading Word, so i'm sure i account for at most 34% of sales...
-
KTC
(9/10)
Feb 21 2004
All compiles except where marked. All should compile int main() { char c; char *p = &c; unsigned x = 0; char b[10]; p[x] = 'o'; x[p] = 'k'; 0[p] = 'r'; b[x] = 'o'; x[b] = 'k'; /* Compiler wrongly gives error */ 0[b] = 'r'; /* Compiler wrongly gives error */ return 0; }
Feb 19 2004
Matthew wrote:All compiles except where marked. All should compilei think it may better stay so. It's definately not very annoying since anyone sane wouldn't write that. You could just as well write (x+b) :> -eye
Feb 20 2004
Matthew wrote:Nonsense. It's non-standard behaviour, and in such a simple thing that any other compiler handles correctly. I really don't think you'll convince Walter to *not* do this, given his desire to be fully-conformant. And as for your assertion that no-one would use such a construct, I'll just smile, and you can wait until you've read "Imperfect C++". Now you've got three reasons to buy it (the other ones being the Properties chapter, and my mentioning your request for properties in the acknowledgements). :)All compiles except where marked. All should compilei think it may better stay so. It's definately not very annoying since anyone sane wouldn't write that. You could just as well write (x+b) :>
Feb 20 2004
Matthew wrote:It's probably so to guard for bugs.Matthew wrote:Nonsense. It's non-standard behaviour, and in such a simple thing that any other compiler handles correctly. I really don't think you'll convince Walter to *not* do this, given his desire to be fully-conformant.All compiles except where marked. All should compilei think it may better stay so. It's definately not very annoying since anyone sane wouldn't write that. You could just as well write (x+b) :>And as for your assertion that no-one would use such a construct, I'll just smile, and you can wait until you've read "Imperfect C++". Now you've got three reasons to buy it (the other ones being the Properties chapter, and my mentioning your request for properties in the acknowledgements).I really don't need to count the reasons, i know i want to get it as soon as it's out. :> Unfortunately, /me would not be able to raise your sales much only by bying it myself. -eye
Feb 20 2004
"Ilya Minkov" <minkov cs.tum.edu> wrote in message news:c169kc$1fdf$2 digitaldaemon.com...Matthew wrote:anyMatthew wrote:Nonsense. It's non-standard behaviour, and in such a simple thing thatAll compiles except where marked. All should compilei think it may better stay so. It's definately not very annoying since anyone sane wouldn't write that. You could just as well write (x+b) :>justother compiler handles correctly. I really don't think you'll convince Walter to *not* do this, given his desire to be fully-conformant.It's probably so to guard for bugs.And as for your assertion that no-one would use such a construct, I'llgotsmile, and you can wait until you've read "Imperfect C++". Now you'veand mythree reasons to buy it (the other ones being the Properties chapter,Don't be so sure. You might account for up to 50% of sales! (I know my mum's going to buy one <g>)mentioning your request for properties in the acknowledgements).I really don't need to count the reasons, i know i want to get it as soon as it's out. :> Unfortunately, /me would not be able to raise your sales much only by bying it myself.
Feb 20 2004
Matthew wrote:I've been spreading Word, so i'm sure i account for at most 34% of sales. -eyeI really don't need to count the reasons, i know i want to get it as soon as it's out. :> Unfortunately, /me would not be able to raise your sales much only by bying it myself.Don't be so sure. You might account for up to 50% of sales! (I know my mum's going to buy one <g>)
Feb 21 2004
"Matthew" wrote...All compiles except where marked. All should compile<snip> Have Walter fixed this already??? :-o Just tried it with 8.40 and it compiles fine... A very impress person, KTC -- Experience is a good school but the fees are high. - Heinrich Heine
Feb 21 2004
He usually posts a response on the NG. Did you try all the cases? I just tried with 8.40.1, and it still fails. "KTC" <me here.com> wrote in message news:c18pf7$30pl$1 digitaldaemon.com..."Matthew" wrote...All compiles except where marked. All should compile<snip> Have Walter fixed this already??? :-o Just tried it with 8.40 and it compiles fine... A very impress person, KTC -- Experience is a good school but the fees are high. - Heinrich Heine
Feb 21 2004
"Matthew" wrote...He usually posts a response on the NG. Did you try all the cases? I just tried with 8.40.1, and it still fails.I've just copied and paste exactly what you posted in the orginial post and it compiles fine for me... scppn.exe gives version 8.40.2n KTC -- Experience is a good school but the fees are high. - Heinrich Heine
Feb 21 2004
"Matthew" wrote...That's what I have. I must conclude that I pasted an incomplete version. Including here again ... Walter, I presume this'll be easy-ish to fix. Any ETA? :) begin 666 subscript.c M(" (" (" J<" /2 ("9C.PT*(" ('5N<VEG;F5D(" (' (" ](" M,#L-"B ("!C:&%R(" (" ("!B6S$P73L-" T*(" ('!;>%T /2 G;R<[ M6WA=(#T ` endHe usually posts a response on the NG. Did you try all the cases? I just tried with 8.40.1, and it still fails.I've just copied and paste exactly what you posted in the orginial post and it compiles fine for me... scppn.exe gives version 8.40.2n
Feb 21 2004
"Matthew" wrote...That's what I have. I must conclude that I pasted an incomplete version. Including hereagain... Walter, I presume this'll be easy-ish to fix. Any ETA? :)Ahha, discovered why. It compiles if one compiles it as C++ but not if it's C.
Feb 22 2004
"KTC" <me here.com> wrote in message news:c1a3um$2ivm$1 digitaldaemon.com..."Matthew" wrote...That's interesting. It also explains a few things I was wondering about. :)That's what I have. I must conclude that I pasted an incomplete version. Including hereagain... Walter, I presume this'll be easy-ish to fix. Any ETA? :)Ahha, discovered why. It compiles if one compiles it as C++ but not if it's C.
Feb 22 2004