paniq
paniq

Reputation: 1175

What is the GCC Option to emulate Microsoft C compiler behavior?

I'm developing a C library for both Linux and Windows. As Microsofts' compiler appears to be a bit backwards in some regards, and I'm mostly coding on Ubuntu, I would like to make GCC behave in a similar way, so I can anticipate the compiler errors I would encounter with MSVC.

Google keeps quiet on my question. Could anyone point me to a source of information? Much obliged!

Upvotes: 1

Views: 270

Answers (1)

Erik
Erik

Reputation: 91270

Your best bet is to use -pedantic -ansi - that makes gcc try to accept only completely standard C89 source.

-fms-extensions adds support for some VC-specific extensions.

Upvotes: 2

Related Questions