On Sat, 4 Aug 2001, William A. Rowe, Jr. wrote:
> ----- Original Message -----
> From: "Jeff Trawick" <[EMAIL PROTECTED]>
>
> > > Index: mod_negotiation.c
> > > ===================================================================
> > > RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_negotiation.c,v
> > > retrieving revision 1.63
> > > retrieving revision 1.64
> > > diff -u -r1.63 -r1.64
> > > --- mod_negotiation.c 2001/08/03 22:57:47 1.63
> > > +++ mod_negotiation.c 2001/08/04 04:32:58 1.64
> >
> > > + char *base = apr_array_pstrcat(sub_req->pool, exception_list, '.');
> >
> > Which lousy compiler would actually compile this statement? It isn't
> > a valid context for a variable declaration.
> >
>
> Evidently, VC. Although I will say I was very tired...
If you mean "lousy _C_ compiler", I don't know. A lousy one. ;-] If you
mean "lousy C++ compiler used to compile C code", the answer is probably
all of them. C++ doesn't much mind you declaring variables right in the
middle of a basic block. Since MSVC is a C++ compiler at heart, I find it
unsurprising that it wouldn't complain about constructs like this. I'm
99% sure g++ wouldn't complain either. (I've actually done something like
that accidentially one time while cut-and-pasting some code, and then
couldn't figure out what the hell the problem was when I took my C code
that compiled perfectly well with g++ and it bombed when I switched back
to gcc. Doh, C is context sensitive about variable declarations, C++
isn't. Crap. =-)
--Cliff
--------------------------------------------------------------
Cliff Woolley
[EMAIL PROTECTED]
Charlottesville, VA