Re: [PATCH 2/2] add support for -fdiagnostic-prefix[=prefix]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 12, 2018 at 04:25:39PM +0100, Ramsay Jones wrote:
> 
> 
> On 11/06/18 03:00, Luc Van Oostenryck wrote:
> > When using sparse it's common to compile a file and directly
> > run sparse on the same file, like it is done for the kernel.
> > In this case, error messages from sparse are interspersed with
> > those from the compiler. It's thus not always easy to know from
> > which tools they come.
> > 
> > Fix this by allowing to prefix all the diagnostic messages
> > by some configurable string, by default "sparse". More exactly,
> > an error message that was emitted like:
> > 	file.c:<line>:<col>: error: this is invalid code
> > can now be emitted as:
> > 	file.c:<line>:<col>: sparse: error: this is invalid code
> > 
> > Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
> > ---
> >  lib.c                     | 22 +++++++++++++++++++---
> >  sparse.1                  |  6 ++++++
> >  validation/fdiag-prefix.c | 11 +++++++++++
> >  3 files changed, 36 insertions(+), 3 deletions(-)
> >  create mode 100644 validation/fdiag-prefix.c
> 
> Don't you need to filter this out in cgcc, so that you don't
> pass this option on to gcc? (ie, add this to the regex in the
> 'check_only_option' subroutine).

Maybe yes but OTOH, I'm not really sure about it.
I thought that cgcc was theer to use sparse transparently:
instead of using gcc you use cgcc et voila. In this case
the options given to cgcc are the same ypu would pass to gcc
itself and thus won't contains sparse-specific options.

I'm missing something here? Maybe some people have other
uses/workflows than what I'm describing here above?

-- Luc
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux