Thread overview | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
February 20, 2004 DMC++ mishandles perverse, but legal, revered subscripting syntax for arrays | ||||
---|---|---|---|---|
| ||||
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; } |
February 20, 2004 Re: DMC++ mishandles perverse, but legal, revered subscripting syntax for arrays | ||||
---|---|---|---|---|
| ||||
Posted in reply to Matthew | Matthew wrote:
> All compiles except where marked. All should compile
i 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
|
February 20, 2004 Re: DMC++ mishandles perverse, but legal, revered subscripting syntax for arrays | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ilya Minkov | > Matthew wrote:
> > All compiles except where marked. All should compile
>
> i 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) :>
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).
:)
|
February 21, 2004 Re: DMC++ mishandles perverse, but legal, revered subscripting syntax for arrays | ||||
---|---|---|---|---|
| ||||
Posted in reply to Matthew | Matthew wrote: >>Matthew wrote: >> >>>All compiles except where marked. All should compile >> >>i 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) :> > > 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. It's probably so to guard for bugs. > 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 |
February 21, 2004 Re: DMC++ mishandles perverse, but legal, revered subscripting syntax for arrays | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ilya Minkov | "Ilya Minkov" <minkov@cs.tum.edu> wrote in message news:c169kc$1fdf$2@digitaldaemon.com... > Matthew wrote: > >>Matthew wrote: > >> > >>>All compiles except where marked. All should compile > >> > >>i 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) :> > > > > 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. > > It's probably so to guard for bugs. > > > 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. Don't be so sure. You might account for up to 50% of sales! (I know my mum's going to buy one <g>) |
February 21, 2004 Re: DMC++ mishandles perverse, but legal, revered subscripting syntax for arrays | ||||
---|---|---|---|---|
| ||||
Posted in reply to Matthew | Matthew wrote:
>>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.
>
> Don't be so sure. You might account for up to 50% of sales! (I know my mum's
> going to buy one <g>)
I've been spreading Word, so i'm sure i account for at most 34% of sales.
-eye
|
February 21, 2004 Re: DMC++ mishandles perverse, but legal, revered subscripting syntax for arrays | ||||
---|---|---|---|---|
| ||||
Posted in reply to Matthew | "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 |
February 21, 2004 Re: DMC++ mishandles perverse, but legal, revered subscripting syntax for arrays | ||||
---|---|---|---|---|
| ||||
Posted in reply to KTC | 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 > > |
February 22, 2004 Re: DMC++ mishandles perverse, but legal, revered subscripting syntax for arrays | ||||
---|---|---|---|---|
| ||||
Posted in reply to Matthew | "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 |
February 22, 2004 Re: DMC++ mishandles perverse, but legal, revered subscripting syntax for arrays | ||||
---|---|---|---|---|
| ||||
Posted in reply to KTC Attachments: | >
> "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
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? :)
|
Copyright © 1999-2021 by the D Language Foundation