Brendon's point is a good one:
It avoids having to define special attributes in the code, the only
difference is the set of command line flags you pass to the compiler.
It does however mean that you cant provide function level
"enable/disable of static checking". I.e. It will check for all
functi
Mike Stump wrote:
Let me try again. The standard way to add a new qualifier in g++, is
to add it in an attribute, please do that.
OK, I agree. Let's say that a method will be declared as
int method() throw(std::exception) __attribute__((static_exc_check));
(this is intended to have the same mea
With respect to this:
Jason Merrill wrote:
Yes. But that's not a reason to add a slightly different non-standard
feature that would require people already using standard exception
specifications to rewrite everything. That's just a non-starter.
Maybe I missed some point: why everything should
I perceived that many people think that the throw qualifiers, as
described by the standard, are not useful, as an example, I quote the
Boost Exception-specification rationale:
Although initially appealing, an exception-specification tends to have
consequences that require very careful thought to
Hello,
I started a thread about the possible development of a throw-like
qualifier for C++ which may statically check that the only possible
exceptions are those declared in the qualifier (please see the
corresponding thread:
http://gcc.gnu.org/ml/gcc/2007-03/msg01162.html
On Apr 2, 2007, at 2:32 AM, Brendon Costa wrote:
I have for a while been working on a tool that performs static
analysis
I agree that Brendon's project is a very good idea, but I still
have an argument against it: having such an analysis into gcc forces
the gcc development community to maintai
ROTECTED]> wrote:
On Mar 30, 2007, at 11:59 AM, Sergio Giro wrote:
> The errors mentioned are compile errors,
So, you want a strict subset of the language standard. This is best
done with something like -fstatic-exception-specifications or maybe -
Wexception-specifications -Werror. If yo
oh-so-cleverly named _throw) and allow
such an extension for the language which something like -fallow_throw.
Cheers,
Sergio
On 3/30/07, Mike Stump <[EMAIL PROTECTED]> wrote:
On Mar 30, 2007, at 11:05 AM, Sergio Giro wrote:
> int TheClass::exceptMethod() _throw TheException {
>
Dear,
I felt a bit disappointed while learning about the throw qualifier.
I think a more useful qualifier can be created in order to describe
the possible exceptions a method can throw, in the following way:
int TheClass::exceptMethod() _throw TheException {
throw TheException();
}
In this c