Re: [PATCH, RFC] plugin to warn about surplus includes

2010-05-21 Thread Bernhard Reutner-Fischer
On Tue, May 18, 2010 at 06:53:18PM -0500, Joel Sherrill wrote: >Would there be a way to exclude specific files? Say something like >config.h that by convention you might want every file to include? Adding a -fplugin-arg-warn_include-exclude-from= should be doable, sure. cheers,

Re: [PATCH, RFC] plugin to warn about surplus includes

2010-05-19 Thread Tom Tromey
> "Bernhard" == Bernhard Reutner-Fischer writes: Bernhard> - should handle structs. There are some other difficult cases. First, don't let this discourage you :-). I think this would be a useful feature. I think in general you cannot actually ever tell if a header is unused or not. Maybe

Re: [PATCH, RFC] plugin to warn about surplus includes

2010-05-18 Thread Joel Sherrill
On 05/18/2010 05:53 PM, Steven Bosscher wrote: On 5/18/10, Bernhard Reutner-Fischer wrote: Hi, A couple of days ago i was asking: does any frontend support some sort of noting that a user-header was included but no decl of it was ever referenced (i.e. superfluous #include) ? I could not f

Re: [PATCH, RFC] plugin to warn about surplus includes

2010-05-18 Thread Steven Bosscher
On 5/18/10, Bernhard Reutner-Fischer wrote: > Hi, > > A couple of days ago i was asking: > does any frontend support some sort of noting that a user-header was > included but no decl of it was ever referenced (i.e. superfluous > #include) ? > > I could not find an appropriate tool to diagnose them

[PATCH, RFC] plugin to warn about surplus includes

2010-05-18 Thread Bernhard Reutner-Fischer
Hi, A couple of days ago i was asking: does any frontend support some sort of noting that a user-header was included but no decl of it was ever referenced (i.e. superfluous #include) ? I could not find an appropriate tool to diagnose them, so i was thinking about a gcc plugin to do that. Would s