* feature-request @ 2008-02-23 13:39 Pierre Habouzit 2008-02-25 2:48 ` feature-request Pavel Roskin 0 siblings, 1 reply; 4+ messages in thread From: Pierre Habouzit @ 2008-02-23 13:39 UTC (permalink / raw) To: linux-sparse [-- Attachment #1: Type: text/plain, Size: 539 bytes --] While I'm at it, there is this feature I'd like to see in sparse: I'd love to be able to ask it to ignore errors that are located in some specific paths (like /usr/include e.g.). For now I'm doing that through a custom script, but it'd be simpler for me if it does it natively. The reason is that I don't want to patch third party libraries headers. -- ·O· Pierre Habouzit ··O madcoder@debian.org OOO http://www.madism.org [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: feature-request 2008-02-23 13:39 feature-request Pierre Habouzit @ 2008-02-25 2:48 ` Pavel Roskin 2008-02-25 8:54 ` feature-request Pierre Habouzit 0 siblings, 1 reply; 4+ messages in thread From: Pavel Roskin @ 2008-02-25 2:48 UTC (permalink / raw) To: Pierre Habouzit; +Cc: linux-sparse On Sat, 2008-02-23 at 14:39 +0100, Pierre Habouzit wrote: > While I'm at it, there is this feature I'd like to see in sparse: I'd > love to be able to ask it to ignore errors that are located in some > specific paths (like /usr/include e.g.). For now I'm doing that through > a custom script, but it'd be simpler for me if it does it natively. The > reason is that I don't want to patch third party libraries headers. We probably don't want to ignore _errors_, as they can indicate that the parser doesn't understand the code correctly. Ignoring warnings would be a good idea. Perhaps a simpler approach would be to turn off warnings in any files included using angle brackets. gcc doesn't report warnings in system files by default, but it can be enabled with -Wsystem-headers. Since sparse is primarily for the kernel, I think the default should be to check the headers (as they are part of the kernel), but sparse could support -Wno-system-headers. Alternatively, sparse could have a userspace mode that would disable warnings in system headers by default (unless -Wsystem-headers is used). The kernel mode could be made stricter for the kernel without affecting the userspace. -- Regards, Pavel Roskin ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: feature-request 2008-02-25 2:48 ` feature-request Pavel Roskin @ 2008-02-25 8:54 ` Pierre Habouzit 2008-02-25 14:22 ` feature-request Pavel Roskin 0 siblings, 1 reply; 4+ messages in thread From: Pierre Habouzit @ 2008-02-25 8:54 UTC (permalink / raw) To: Pavel Roskin; +Cc: linux-sparse [-- Attachment #1: Type: text/plain, Size: 1895 bytes --] On Mon, Feb 25, 2008 at 02:48:45AM +0000, Pavel Roskin wrote: > > On Sat, 2008-02-23 at 14:39 +0100, Pierre Habouzit wrote: > > While I'm at it, there is this feature I'd like to see in sparse: I'd > > love to be able to ask it to ignore errors that are located in some > > specific paths (like /usr/include e.g.). For now I'm doing that through > > a custom script, but it'd be simpler for me if it does it natively. The > > reason is that I don't want to patch third party libraries headers. > > We probably don't want to ignore _errors_, as they can indicate that the > parser doesn't understand the code correctly. Ignoring warnings would > be a good idea. Of course it's what I meant. > Perhaps a simpler approach would be to turn off warnings in any files > included using angle brackets. Nope, that's not good, because I use angle brackets to #include files from my projects when I use internally in-tree headers that will in the end be public. I'd rather like to ask to ignore warnings for example, for file under /usr/include and /usr/lib/gcc/ > gcc doesn't report warnings in system files by default, but it can be > enabled with -Wsystem-headers. Since sparse is primarily for the > kernel, I think the default should be to check the headers (as they are > part of the kernel), but sparse could support -Wno-system-headers. yeah, that'd be really great. > Alternatively, sparse could have a userspace mode that would disable > warnings in system headers by default (unless -Wsystem-headers is used). > The kernel mode could be made stricter for the kernel without affecting > the userspace. I don't really mind this way or the other, really :) -- ·O· Pierre Habouzit ··O madcoder@debian.org OOO http://www.madism.org [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: feature-request 2008-02-25 8:54 ` feature-request Pierre Habouzit @ 2008-02-25 14:22 ` Pavel Roskin 0 siblings, 0 replies; 4+ messages in thread From: Pavel Roskin @ 2008-02-25 14:22 UTC (permalink / raw) To: Pierre Habouzit; +Cc: linux-sparse On Mon, 2008-02-25 at 09:54 +0100, Pierre Habouzit wrote: > > Perhaps a simpler approach would be to turn off warnings in any files > > included using angle brackets. > > Nope, that's not good, because I use angle brackets to #include files > from my projects when I use internally in-tree headers that will in the > end be public. > > I'd rather like to ask to ignore warnings for example, for file under > /usr/include and /usr/lib/gcc/ You are right. I think sparse should try to follow gcc in this regard. There are three hardcoded directories in pre-process.c (/usr/include, /usr/local/include and the gcc include directory). Maybe they should be considered system include directories. -- Regards, Pavel Roskin ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-02-25 14:22 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-02-23 13:39 feature-request Pierre Habouzit 2008-02-25 2:48 ` feature-request Pavel Roskin 2008-02-25 8:54 ` feature-request Pierre Habouzit 2008-02-25 14:22 ` feature-request Pavel Roskin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).