public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* Recover from errors
@ 2005-02-02  8:37 Grigorio V. Moshkin
  2005-02-02 12:03 ` Giovanni Bajo
  0 siblings, 1 reply; 2+ messages in thread
From: Grigorio V. Moshkin @ 2005-02-02  8:37 UTC (permalink / raw)
  To: gcc-bugs

Hi!

First, thanks to Andrew Pinski <pinskia@physics.uc.edu>, for his fast and 
exact replay to my previous question!

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Recover from errors
  2005-02-02  8:37 Recover from errors Grigorio V. Moshkin
@ 2005-02-02 12:03 ` Giovanni Bajo
  0 siblings, 0 replies; 2+ messages in thread
From: Giovanni Bajo @ 2005-02-02 12:03 UTC (permalink / raw)
  To: Grigorio V. Moshkin; +Cc: gcc-bugs

Grigorio V. Moshkin <grigorio@garant.ru> 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-02-02 12:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-02  8:37 Recover from errors Grigorio V. Moshkin
2005-02-02 12:03 ` Giovanni Bajo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).