[OT] Visual C++ question

Jonathan Arnold jdarnold at buddydog.org
Fri Feb 21 10:15:56 EST 2003


> I think that Grant answered my question. The suffix alone will not force
> VC++ to shift to C mode. 

Sorry to jump into this late, but I believe this is wrong. And in fact,
I've done some testing and found that, if you use a .c, then Visual C++
(and Borland C++) will treat the file as a C file.

Now, the test program that was posted will return "Broken C89 Compiler",
because one of the extensions used by both compilers is allowing // for
a comment, even in a .C file. However, if you use /Za (or -A for BCC32),
which disable extensions, then you get "C89 Compiler".

-- 
Jonathan Arnold     (mailto:jdarnold at buddydog.org)
Amazing Developments       http://www.buddydog.org

It ain't what you don't know that gets you into trouble.
It's what you know for sure that just ain't so.  Mark Twain




More information about the Discuss mailing list