Re: /usr/src/ed/bin/re.c:99

2002-11-06 Thread Terry Lambert
Marc Olzheim wrote: > > In any case, your fears are unfounded, for the most part, since > > the FAQ entry you are referencing is not analogous to the construct > > you are trying to apply it to, anyway, and the FAQ fails to deal > > with many of these portability issues, too, since it assumes that

Re: /usr/src/ed/bin/re.c:99

2002-11-06 Thread Marc Olzheim
[snip interesting piece of compiler history] > In any case, your fears are unfounded, for the most part, since > the FAQ entry you are referencing is not analogous to the construct > you are trying to apply it to, anyway, and the FAQ fails to deal > with many of these portability issues, too, sinc

Re: /usr/src/ed/bin/re.c:99

2002-11-06 Thread Terry Lambert
Marc Olzheim wrote: > .. > if ((nd = parse_char_class(++nd)) == NULL) { > .. > > Hmmm... is this legal ? > > http://www.eskimo.com/~scs/C-faq/q3.1.html seems to tell otherwise... The FAQ entry you reference has nothing to say about this at all... it has to do with whether the *location* of the l

Re: /usr/src/ed/bin/re.c:99

2002-11-06 Thread Jordan K Hubbard
It's legal, though one would have to know what the author was thinking (or at least read the surrounding code) before stating that it's also "correct". It's legal because, unlike the example given in that FAQ entry you referenced, there's an implicit ordering in the expression that even the mo

Re: /usr/src/ed/bin/re.c:99

2002-11-06 Thread Marc Olzheim
> If it were nd++, yes. However, it is ++nd, thus, the increment > happens first, then the call to parse_char_class(), then the assignment > to nd. Ah right, sorry, my mistake... Zlo To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

Re: RE: /usr/src/ed/bin/re.c:99

2002-11-06 Thread Erik Trulsson
On Wed, Nov 06, 2002 at 11:54:17AM -0500, John Baldwin wrote: > > On 06-Nov-2002 Marc Olzheim wrote: > > .. > > if ((nd = parse_char_class(++nd)) == NULL) { > > .. > > > > Hmmm... is this legal ? > > > > http://www.eskimo.com/~scs/C-faq/q3.1.html seems to tell otherwise... > > If it were nd++,

Re: /usr/src/ed/bin/re.c:99

2002-11-06 Thread Peter Pentchev
On Wed, Nov 06, 2002 at 05:46:53PM +0100, Marc Olzheim wrote: > .. > if ((nd = parse_char_class(++nd)) == NULL) { > .. > > Hmmm... is this legal ? > > http://www.eskimo.com/~scs/C-faq/q3.1.html seems to tell otherwise... In this particular case, the value of 'nd' is not *used* anywhere in the ex

RE: /usr/src/ed/bin/re.c:99

2002-11-06 Thread John Baldwin
On 06-Nov-2002 Marc Olzheim wrote: > .. > if ((nd = parse_char_class(++nd)) == NULL) { > .. > > Hmmm... is this legal ? > > http://www.eskimo.com/~scs/C-faq/q3.1.html seems to tell otherwise... If it were nd++, yes. However, it is ++nd, thus, the increment happens first, then the call to parse

/usr/src/ed/bin/re.c:99

2002-11-06 Thread Marc Olzheim
.. if ((nd = parse_char_class(++nd)) == NULL) { .. Hmmm... is this legal ? http://www.eskimo.com/~scs/C-faq/q3.1.html seems to tell otherwise... Zlo To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message