httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <>
Subject Re: cvs commit: httpd-2.0/modules/http mod_mime.c
Date Mon, 06 Aug 2001 12:22:51 GMT
Cliff Woolley <> writes:

> > 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.  =-)


(this may be my lack of Visual Studio 5.0 skills, but anyway...) I
just tried to create a new C file and there wasn't such a thing on the
menu.  I can create a "C/C++ Header File" or a "C++ Source File."

>From the command-line (cl.exe) I tried to compile something like

  int main(void) { char x; x = 0; char y; y = 1; return 0; }

and it failed if the file was named test.c and it succeeded if the
file was named test.cpp.

I wonder if newer levels of Visual Studio or the compiler itself
aren't doing the right thing (or there is something in/missing from
the project file which tells it to treat everything as c++...
Jeff Trawick | | PGP public key at web site:
             Born in Roswell... married an alien...

View raw message