Need Standard C++ Compiler for M$ Windows

Kevin Kofler kevin.kofler at chello.at
Tue Aug 15 13:14:27 UTC 2006


Arthur Pemberton <pemboa <at> gmail.com> writes:
> and basically, if it
> compiles in Visual Studio, it will compile in g++.

Not really... There are some non-standard constructs which M$VC++ accepts and 
g++ (at least current versions of it) don't, for example lvalue casts. 
Moreover, for both compilers, the older the version, the less compliant to the 
standard they are. But I believe, even if you compare current version against 
current version, g++ is more compliant, meaning it will accept some constructs 
compliant to the standard which M$VC++ rejects and reject some non-standard 
constructs which M$VC++ accepts.

Also beware that g++ puts compliance above backwards-compatibility. Newer 
versions are known to reject constructs which have worked before (or which work 
in M$VC++) if they're not allowed by the standard. Sometimes -fpermissive helps 
(you'll still get a warning, but at least the code will compile), sometimes it 
doesn't.

        Kevin Kofler




More information about the fedora-list mailing list