Jump to page: 1 2
Thread overview
[BUG] reversed subscript operator still not supported in C
Mar 26, 2004
Matthew
Mar 26, 2004
Ilya Minkov
Mar 26, 2004
Matthew
Mar 26, 2004
Jan Knepper
Mar 26, 2004
Matthew
Mar 26, 2004
gf
Mar 26, 2004
Will Dean
Mar 27, 2004
Matthew
Mar 27, 2004
Jan Knepper
Mar 26, 2004
Matthew
Mar 27, 2004
Ilya Minkov
Mar 27, 2004
gf
March 26, 2004
char ch;
char *p = &ch;

0[p] = 'a';



March 26, 2004
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
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
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
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
"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
"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
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
"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
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
« First   ‹ Prev
1 2