Grigorio V. Moshkin <[EMAIL PROTECTED]> wrote: > I am porting one large windows application to linux. Code is formerly > platform independent. But, Microsoft Visual C++ (MSVC) 6 is very > unserious with ISO C++ standard.
MSVC6 predates the ISO C++ standard. > For exemple, consider the fragment: > > class A { > public: > virtual void func() throw (C, D); > }; > > class B: public A { > public: > void func(); > }; > > Of course, gcc notices the error: > "looser throw specifier for `virtual void func()'". And, it's ISO C++ > strict rule. But MSVC doesn't emit an error and simply compiles that > code. > > The problem is there are too many fragments of code above with this > tipical error and other few tipical errors. > > Does gcc allow (maybe via an undocumented option or slight SOURCE > HACKING (thats because I write to gcc-BUGS mailing list)) to generate > C++ code with this tipical errors FIXED? I ask just because I see, > gcc does collect all SUFFICIENT (enough) INFO to FIX that tipical > erros. GCC is not able to reproduce the C++ source code it compiles on the output, let alone modified. Just fix the bugs in your code like everyone else does :) Giovanni Bajo