Re: Extension for a throw-like C++ qualifier

2007-04-04 Thread Brendon Costa
I don't have a lot of experience with GCC development. I know enough to have done what i needed to do. As for a place to start i would read the GCC internals documentation as a first step. There is also a lot of info on the Wiki too. However a lot of documentation is specific to either creating a

Re: Extension for a throw-like C++ qualifier

2007-04-04 Thread Sergio Giro
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

Re: Extension for a throw-like C++ qualifier

2007-04-02 Thread Mike Stump
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 Ah, yeah, that I suspect would be a even better way to do this... Itt would be nice if gcc/g++ had more support for static analysis tools... Maybe with LTO.

Re: Extension for a throw-like C++ qualifier

2007-04-02 Thread Brendon Costa
I have for a while been working on a tool that performs static analysis of exception propagation through C/C++ code. It is very close to complete (I estimate the first release within the month). Implementing static analysis of C++ exception propagation in g++ alone is not really possible well at l

Re: Extension for a throw-like C++ qualifier

2007-04-01 Thread Sergio Giro
Maybe that the option you suggest This is best done with something like -fstatic-exception-specifications or maybe - Wexception-specifications -Werror. is ideal, but it seems to me not practical at all. Every stuff using the throw qualifier as specified in the standards will not work. If an in

Re: Extension for a throw-like C++ qualifier

2007-03-30 Thread Mike Stump
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 you wanted finer control

Re: Extension for a throw-like C++ qualifier

2007-03-30 Thread Sergio Giro
On 3/30/07, Mike Stump <[EMAIL PROTECTED]> wrote: ? Just what did you want that isn't in the standard again? Is the feature you want just static checking for exception specifications at compile time? Yes, it is. Please read "compile time" when it says "runtime". The errors mentioned are compi

Re: Extension for a throw-like C++ qualifier

2007-03-30 Thread Mike Stump
On Mar 30, 2007, at 11:05 AM, Sergio Giro wrote: int TheClass::exceptMethod() _throw TheException { throw TheException(); } In this case, the gcc would check at runtime that the only exception the method exceptMethod may throw is TheException. It does. Moreover int TheClass::wrongMethod()

Extension for a throw-like C++ qualifier

2007-03-30 Thread Sergio Giro
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