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

Re: customizable warnings with a GCC plugin

2011-04-29 Thread Gabriel Dos Reis
On Fri, Apr 29, 2011 at 1:49 PM, Basile Starynkevitch wrote: > So I don't expect MELT to work under Windows very soon :-) so, is this all a plot to get GCC melt down on windows? ;-p -- Gaby

Re: customizable warnings with a GCC plugin

2011-04-29 Thread Basile Starynkevitch
On Fri, 29 Apr 2011 14:30:32 -0400 Kyle Girard wrote: > Just a point of info > > A few months ago I asked about the possibility/state of plugins on > windows. While having run-time plugins was basically impossible (because > of the work involved) link-time plugins were possible and I was give

Re: customizable warnings with a GCC plugin

2011-04-29 Thread Kyle Girard
> The major issue is to have GCC plugins working on Windows (and, when > that happens, to adapt existing plugins, including melt.so, to work > under Windows). I know nothing about the subject, but Levine's book on > linkers & loaders makes me believe it might not be fun. > Just a point of info..

Re: customizable warnings with a GCC plugin

2011-04-29 Thread Basile Starynkevitch
On Fri, 29 Apr 2011 16:25:39 +0200 David Brown wrote: [...] I am skipping interesting parts of David reply (I might reply to them later) > > For the longer term, it would be good if there were a way to use this > with windows (and without installing all of cygwin). I know these > things are /m

Re: customizable warnings with a GCC plugin

2011-04-29 Thread Pierre Vittet
Using MELT is always heavily discussed :). I thinks this project is really an opportunity to see how useful is MELT. Limitation doesn't really come from the syntax (infix or not) but from what is already implemented (cannot make code replacement, not a complete implementation of IPA). However

Re: customizable warnings with a GCC plugin

2011-04-29 Thread David Brown
On 29/04/2011 13:16, Basile Starynkevitch wrote: On Fri, 29 Apr 2011 12:30:45 +0200 David Brown wrote: There is a lot of interesting and useful work that could be done here. Melt is a nice idea, but the big barrier (for me, anyway) is the language - it's Lisp, which is very different to other

Re: customizable warnings with a GCC plugin

2011-04-29 Thread Basile Starynkevitch
On Fri, 29 Apr 2011 12:30:45 +0200 David Brown wrote: > > There is a lot of interesting and useful work that could be done here. > Melt is a nice idea, but the big barrier (for me, anyway) is the > language - it's Lisp, which is very different to other languages that > I've used. Pierre Vit

Re: customizable warnings with a GCC plugin

2011-04-29 Thread David Brown
On 29/04/2011 09:24, Pierre Vittet wrote: Hi, My name is Pierre Vittet and my GSOC application as been selected. My project is about writing a plugin allowing GCC users to add some simple warnings, being useful in their particular project. The user should be able to add rules like "when I got a

Re: customizable warnings with a GCC plugin

2011-04-29 Thread Basile Starynkevitch
On Fri, 29 Apr 2011 09:24:43 +0200 Pierre Vittet wrote: > Hi, > > My name is Pierre Vittet and my GSOC application as been selected. My > project is about writing a plugin allowing GCC users to add some simple > warnings, being useful in their particular project. [...] Thanks to Pierre for h

customizable warnings with a GCC plugin

2011-04-29 Thread Pierre Vittet
Hi, My name is Pierre Vittet and my GSOC application as been selected. My project is about writing a plugin allowing GCC users to add some simple warnings, being useful in their particular project. The user should be able to add rules like "when I got a call to a foo function, I would like to