Re: [GSOC] Customizable warnings with a GCC plugin

2011-08-13 Thread Pierre Vittet
Hello, thanks for you mail. You are right my plugin returns a 'false' warning on your case. That should be possible to handle this case but it needs some search: when parsing func,we should request to look at the Guard constructor (either by inserting a new pass or maybe by using LTO (but I should

Re: [GSOC] Customizable warnings with a GCC plugin

2011-08-12 Thread Jonathan Wakely
On 12 August 2011 15:54, Pierre Vittet wrote: > > For the moment, the plugin has only be tested on C code, this might > works with only few changes for C++. Would your example tests for grub warn about the following C++ code? struct Guard { Guard(void* p) : p(p) { if (!p) throw std::bad_alloc

[GSOC] Customizable warnings with a GCC plugin

2011-08-12 Thread Pierre Vittet
Hello, As the GSOC ending is approching, I tried on a real project (GNU Grub) the plugin that I am developping. This plugin allows the user to add warnings when compiling, depending of rules that he has previously written. Here is an exemple of possible rules : (testNull "grub_malloc") T