* throw specification warnings in c++
@ 2003-12-21 13:05 Mikael Hedberg
2003-12-22 5:33 ` Eljay Love-Jensen
0 siblings, 1 reply; 2+ messages in thread
From: Mikael Hedberg @ 2003-12-21 13:05 UTC (permalink / raw)
To: gcc-help
Hi,
After searching the documentation, web and archives for quite considerable
amounts of time I've still been unable to find any information on this.
I'd like to get warnings at compile-time when doing things which obviously
break throw specifications, somewhat like java's compile-time errors for
not catching or declaring a "throws" exception type. Things like
void f() throw (int);
void g() throw () {
f();
}
which obviously break the specification. However I've been unable to find
out any options to get such warnings from g++. Is there any way to get
such warnings? And if not, does anyone know of projects/ideas to create
such a warning?
Regards,
/Mikael Hedberg
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: throw specification warnings in c++
2003-12-21 13:05 throw specification warnings in c++ Mikael Hedberg
@ 2003-12-22 5:33 ` Eljay Love-Jensen
0 siblings, 0 replies; 2+ messages in thread
From: Eljay Love-Jensen @ 2003-12-22 5:33 UTC (permalink / raw)
To: Mikael Hedberg, gcc-help
Hi Mikael,
Perhaps something like PCLint++ would analyze throw specification violations. GCC does not, as far as I am aware.
Unlike Java, C++ handles violations of the throw specification at runtime, not at compile time. (Unfortunately, IMHO.)
HTH,
--Eljay
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-12-22 5:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-21 13:05 throw specification warnings in c++ Mikael Hedberg
2003-12-22 5:33 ` Eljay Love-Jensen
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).