Thread overview | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
March 26, 2004 [BUG] reversed subscript operator still not supported in C | ||||
---|---|---|---|---|
| ||||
char ch; char *p = &ch; 0[p] = 'a'; |
March 26, 2004 Re: [BUG] reversed subscript operator still not supported in C | ||||
---|---|---|---|---|
| ||||
Posted in reply to Matthew | Matthew schrieb:
> char ch;
> char *p = &ch;
>
> 0[p] = 'a';
>
Oh, come on, do you really need it? I'm pretty much sure that this was Walter's conscious desision to disallow that, so pointing his nose into standard or just popping up from time to time would give you nothing. It seems that C standard defines subscript as addition, but Walter has made additional (!) effort to actually do a subscript out of it!
-eye
|
March 26, 2004 Re: [BUG] reversed subscript operator still not supported in C | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ilya Minkov | I have not idea what point you're making. The compiler has non-standard behaviour. What more needs to be said? "Ilya Minkov" <minkov@cs.tum.edu> wrote in message news:c418p9$1uaf$1@digitaldaemon.com... > Matthew schrieb: > > char ch; > > char *p = &ch; > > > > 0[p] = 'a'; > > > > Oh, come on, do you really need it? I'm pretty much sure that this was Walter's conscious desision to disallow that, so pointing his nose into standard or just popping up from time to time would give you nothing. It seems that C standard defines subscript as addition, but Walter has made additional (!) effort to actually do a subscript out of it! > > -eye |
March 26, 2004 Re: [BUG] reversed subscript operator still not supported in C | ||||
---|---|---|---|---|
| ||||
Posted in reply to Matthew | Have you talked to Microsoft or Borland lately? Matthew wrote: > I have not idea what point you're making. The compiler has non-standard > behaviour. What more needs to be said? -- ManiaC++ Jan Knepper But as for me and my household, we shall use Mozilla... www.mozilla.org |
March 26, 2004 Re: [BUG] reversed subscript operator still not supported in C | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jan Knepper | About what?
> Have you talked to Microsoft or Borland lately?
>
>
>
> Matthew wrote:
> > I have not idea what point you're making. The compiler has non-standard behaviour. What more needs to be said?
>
> --
> ManiaC++
> Jan Knepper
>
> But as for me and my household, we shall use Mozilla... www.mozilla.org
|
March 26, 2004 Re: [BUG] reversed subscript operator still not supported in C | ||||
---|---|---|---|---|
| ||||
Posted in reply to Matthew | "Matthew" <matthew@stlsoft.org> wrote in news:c41j5r$2fmp$1@digitaldaemon.com: > About what? I guess it was sarcasm about DMC's non-standard behaviour. I agree with you, Matthew, this is non-standard - I've seen it writen in C++ : The Core Language - and, as far as I know, VC and BCC do allow this. >> Have you talked to Microsoft or Borland lately? >> >> Matthew wrote: >> > I have not idea what point you're making. The compiler has non-standard behaviour. What more needs to be said? >> >> -- >> ManiaC++ >> Jan Knepper >> >> But as for me and my household, we shall use Mozilla... www.mozilla.org ~/gnf.pt |
March 26, 2004 Re: [BUG] reversed subscript operator still not supported in C | ||||
---|---|---|---|---|
| ||||
Posted in reply to gf | "gf" <mz_y2k@yahoo...com> wrote in message news:Xns94B8E2E9992CDmzy2kyahoocom@63.105.9.61... > > I guess it was sarcasm about DMC's non-standard behaviour. > I agree with you, Matthew, this is non-standard - I've seen it writen in > C++ : The Core Language - and, as far as I know, VC and BCC do allow this. And Walter has said that he's not working on some of the crashing bugs at the moment because he wants to get the standards compliance right first. So I expect he's more pleased to receive info about compliance bugs than he would be to get it about crashes... Will |
March 26, 2004 Re: [BUG] reversed subscript operator still not supported in C | ||||
---|---|---|---|---|
| ||||
Posted in reply to gf | All the other Win32 compilers - Borland, Comeau, CodePlay, CodeWarrior, GCC, Intel, MSVC, Watcom - work correctly in this regard. The reason it's come up again is because I was expanding the compatibility of the recls test programs to as many compilers as possible, and one of the C clients uses my NUM_ELEMENTS macro, which uses the reversed subscript form. <pretty-shameless-plug>The reasons for doing so are to be found in Chapter 2 of "Imperfect C++", which should be out in Sept/Oct</pretty-shameless-plug> IMO, if something is non-standard, then that looks (and is) bad, no matter how esoteric. The fact that it must be ridiculously simple to fix - since this works for C++, it must be - then I cannot see any good reason why the non-conformance would be dealt-with (Walter's ridiculous workload notwithstanding, of course). "gf" <mz_y2k@yahoo...com> wrote in message news:Xns94B8E2E9992CDmzy2kyahoocom@63.105.9.61... > "Matthew" <matthew@stlsoft.org> wrote in news:c41j5r$2fmp$1@digitaldaemon.com: > > > About what? > > I guess it was sarcasm about DMC's non-standard behaviour. > I agree with you, Matthew, this is non-standard - I've seen it writen in > C++ : The Core Language - and, as far as I know, VC and BCC do allow this. > > > >> Have you talked to Microsoft or Borland lately? > >> > >> Matthew wrote: > >> > I have not idea what point you're making. The compiler has non-standard behaviour. What more needs to be said? > >> > >> -- > >> ManiaC++ > >> Jan Knepper > >> > >> But as for me and my household, we shall use Mozilla... www.mozilla.org > > > ~/gnf.pt |
March 27, 2004 Re: [BUG] reversed subscript operator still not supported in C | ||||
---|---|---|---|---|
| ||||
Posted in reply to Will Dean | "Will Dean" <will@nospam.demon.co.uk> wrote in message news:c42c37$oah$1@digitaldaemon.com... > "gf" <mz_y2k@yahoo...com> wrote in message news:Xns94B8E2E9992CDmzy2kyahoocom@63.105.9.61... > > > > I guess it was sarcasm about DMC's non-standard behaviour. > > I agree with you, Matthew, this is non-standard - I've seen it writen in > > C++ : The Core Language - and, as far as I know, VC and BCC do allow this. > > And Walter has said that he's not working on some of the crashing bugs at the moment because he wants to get the standards compliance right first. > > So I expect he's more pleased to receive info about compliance bugs than he > would be to get it about crashes... > > Will Ah, I understand the sarcasm now. Doh! It was "Borland and Microsoft have lots of non-standard behaviour, so why should Digital Mars care?". Well, I see no virtue in that position, and I would guess Walter doesn't either. |
March 27, 2004 Re: [BUG] reversed subscript operator still not supported in C | ||||
---|---|---|---|---|
| ||||
Posted in reply to Matthew | Matthew wrote: > Ah, I understand the sarcasm now. Doh! It was "Borland and Microsoft have > lots of non-standard behaviour, so why should Digital Mars care?". Oh... > Well, I see no virtue in that position, and I would guess Walter doesn't > either. Walter probably will fix it sometime. You probably can fix it with a C-style cast too... -- ManiaC++ Jan Knepper But as for me and my household, we shall use Mozilla... www.mozilla.org |
Copyright © 1999-2021 by the D Language Foundation